提交 ce6b04ee 编写于 作者: Y Yuval Mintz 提交者: David S. Miller

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: NDan Carpenter <dan.carpenter@oracle.com>
Fixes: abd49676 ("qed: Add RoCE ll2 & GSI support")
Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 76506a98
...@@ -2809,11 +2809,6 @@ static int qed_roce_ll2_stop(struct qed_dev *cdev) ...@@ -2809,11 +2809,6 @@ static int qed_roce_ll2_stop(struct qed_dev *cdev)
struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2; struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2;
int rc; int rc;
if (!cdev) {
DP_ERR(cdev, "qed roce ll2 stop: invalid cdev\n");
return -EINVAL;
}
if (roce_ll2->handle == QED_LL2_UNUSED_HANDLE) { if (roce_ll2->handle == QED_LL2_UNUSED_HANDLE) {
DP_ERR(cdev, "qed roce ll2 stop: cannot stop an unused LL2\n"); DP_ERR(cdev, "qed roce ll2 stop: cannot stop an unused LL2\n");
return -EINVAL; return -EINVAL;
...@@ -2850,7 +2845,7 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev, ...@@ -2850,7 +2845,7 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev,
int rc; int rc;
int i; int i;
if (!cdev || !pkt || !params) { if (!pkt || !params) {
DP_ERR(cdev, DP_ERR(cdev,
"roce ll2 tx: failed tx because one of the following is NULL - drv=%p, pkt=%p, params=%p\n", "roce ll2 tx: failed tx because one of the following is NULL - drv=%p, pkt=%p, params=%p\n",
cdev, pkt, params); cdev, pkt, params);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册