qlogic/qed: remove bogus NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Nov 2015 13:27:16 +0000 (16:27 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 03:06:13 +0000 (22:06 -0500)
We check if "p_hwfn" is NULL and then dereference it in the error
handling code.  I read the code and it isn't NULL so let's remove the
check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_int.c

index 2e399b6137a27899e97108cf5f35024f8b4d2ed0..de50e84902afe3b6a26c422d34a687ec9bc523ec 100644 (file)
@@ -251,11 +251,6 @@ void qed_int_sp_dpc(unsigned long hwfn_cookie)
        int arr_size;
        u16 rc = 0;
 
-       if (!p_hwfn) {
-               DP_ERR(p_hwfn->cdev, "DPC called - no hwfn!\n");
-               return;
-       }
-
        if (!p_hwfn->p_sp_sb) {
                DP_ERR(p_hwfn->cdev, "DPC called - no p_sp_sb\n");
                return;