From: Dan Carpenter Date: Wed, 4 Nov 2015 13:27:16 +0000 (+0300) Subject: qlogic/qed: remove bogus NULL check X-Git-Tag: v4.1.12-92~115^2~108 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be0938bdc813af5592f4d5ac93787654db158d44;p=users%2Fjedix%2Flinux-maple.git qlogic/qed: remove bogus NULL check 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 Acked-by: Yuval Mintz Signed-off-by: David S. Miller Orabug: 23732603 Signed-off-by: Manjunath Govindashetty --- diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.c b/drivers/net/ethernet/qlogic/qed/qed_int.c index 2e399b6137a2..de50e84902af 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_int.c +++ b/drivers/net/ethernet/qlogic/qed/qed_int.c @@ -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;