aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@caviumnetworks.com>2016-10-13 15:57:01 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-14 11:07:22 -0400
commitce6b04ee8b112cc9d5ef41ba697a3ffabc630f42 (patch)
treed0b5bdcac704ada0f696339e26e219d4452b67b7
parent76506a986dc31394fd1f2741db037d29c7e57843 (diff)
qed: Fix static checker warning.
Smatch compains about qed_roce_ll2_tx() dereference of the 'cdev' variable while testing its validity later. As the validation checking is an over-kill [variable would always be set], simply remove it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support") Signed-off-by: Yuval Mintz <Yuval.Mintz@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_roce.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_roce.c b/drivers/net/ethernet/qlogic/qed/qed_roce.c
index 76831a398bed..c73638ceb1ad 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_roce.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_roce.c
@@ -2809,11 +2809,6 @@ static int qed_roce_ll2_stop(struct qed_dev *cdev)
2809 struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2; 2809 struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2;
2810 int rc; 2810 int rc;
2811 2811
2812 if (!cdev) {
2813 DP_ERR(cdev, "qed roce ll2 stop: invalid cdev\n");
2814 return -EINVAL;
2815 }
2816
2817 if (roce_ll2->handle == QED_LL2_UNUSED_HANDLE) { 2812 if (roce_ll2->handle == QED_LL2_UNUSED_HANDLE) {
2818 DP_ERR(cdev, "qed roce ll2 stop: cannot stop an unused LL2\n"); 2813 DP_ERR(cdev, "qed roce ll2 stop: cannot stop an unused LL2\n");
2819 return -EINVAL; 2814 return -EINVAL;
@@ -2850,7 +2845,7 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev,
2850 int rc; 2845 int rc;
2851 int i; 2846 int i;
2852 2847
2853 if (!cdev || !pkt || !params) { 2848 if (!pkt || !params) {
2854 DP_ERR(cdev, 2849 DP_ERR(cdev,
2855 "roce ll2 tx: failed tx because one of the following is NULL - drv=%p, pkt=%p, params=%p\n", 2850 "roce ll2 tx: failed tx because one of the following is NULL - drv=%p, pkt=%p, params=%p\n",
2856 cdev, pkt, params); 2851 cdev, pkt, params);