]> 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)
commite60b7c08682769d9208fe1f54a3be692e972dc1f
tree11187370374edd6dabd62e9c06ebcf040cbcd89c
parentce00d5ff292fb410ad884de73c98c190a9b13168
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