Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce6b04ee authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: abd49676 ("qed: Add RoCE ll2 & GSI support")
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@caviumnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 76506a98
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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);