qede: fix general protection fault may occur on probe
authorAmrani, Ram <Ram.Amrani@cavium.com>
Wed, 23 Nov 2016 08:03:04 +0000 (08:03 +0000)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Dec 2016 19:16:49 +0000 (14:16 -0500)
The recent introduction of qedr driver support in qede causes a GPF when probing the driver in a server without a RoCE enabled QLogic NIC. This fix avoids using an uninitialized pointer in such a case. Caught by the kernel test robot.

Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/net/ethernet/qlogic/qede/qede_roce.c

index 9867f960b063f3f8515f5dc5cadb66e7ecbe80ce..49272716a7c495e9767daa9d5dfb217206eb8744 100644 (file)
@@ -191,8 +191,8 @@ int qede_roce_register_driver(struct qedr_driver *drv)
        }
        mutex_unlock(&qedr_dev_list_lock);
 
-       DP_INFO(edev, "qedr: discovered and registered %d RoCE funcs\n",
-               qedr_counter);
+       pr_notice("qedr: discovered and registered %d RoCE funcs\n",
+                 qedr_counter);
 
        return 0;
 }