]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Fix potential NULL ptr dereference
authorTadeusz Struk <tadeusz.struk@intel.com>
Thu, 9 Jun 2016 14:51:45 +0000 (07:51 -0700)
committerDoug Ledford <dledford@redhat.com>
Sat, 18 Jun 2016 00:11:27 +0000 (20:11 -0400)
commit50327b69d93b04a5f57377beaa346ae1af1f7cb9
tree11187370374edd6dabd62e9c06ebcf040cbcd89c
parente2633b046fd16d7e8f416c8379fb70a4077238e7
IB/hfi1: Fix potential NULL ptr dereference

This fixes potential NULL ptr dereference because IS_ERR(dd) doesn't
handle NULL. Fix the issue by initializing the pointer with a not NULL
error code.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/init.c