summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@caviumnetworks.com>2016-10-13 22:57:01 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-14 11:07:22 -0400
commitce6b04ee8b112cc9d5ef41ba697a3ffabc630f42 (patch)
treed0b5bdcac704ada0f696339e26e219d4452b67b7 /drivers/net/ethernet/qlogic
parent76506a986dc31394fd1f2741db037d29c7e57843 (diff)
downloadop-kernel-dev-ce6b04ee8b112cc9d5ef41ba697a3ffabc630f42.zip
op-kernel-dev-ce6b04ee8b112cc9d5ef41ba697a3ffabc630f42.tar.gz
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>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-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 76831a3..c73638c 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)
struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2;
int rc;
- if (!cdev) {
- DP_ERR(cdev, "qed roce ll2 stop: invalid cdev\n");
- return -EINVAL;
- }
-
if (roce_ll2->handle == QED_LL2_UNUSED_HANDLE) {
DP_ERR(cdev, "qed roce ll2 stop: cannot stop an unused LL2\n");
return -EINVAL;
@@ -2850,7 +2845,7 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev,
int rc;
int i;
- if (!cdev || !pkt || !params) {
+ if (!pkt || !params) {
DP_ERR(cdev,
"roce ll2 tx: failed tx because one of the following is NULL - drv=%p, pkt=%p, params=%p\n",
cdev, pkt, params);
OpenPOWER on IntegriCloud