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

Commit 18ceb99f authored by Shai Malin's avatar Shai Malin Committed by Greg Kroah-Hartman
Browse files

qed: Fix null-pointer dereference in qed_rdma_create_qp()



[ Upstream commit d33d19d313d3466abdf8b0428be7837aff767802 ]

Fix a possible null-pointer dereference in qed_rdma_create_qp().

Changes from V2:
- Revert checkpatch fixes.

Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarShai Malin <smalin@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f1a0db49
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1245,8 +1245,7 @@ qed_rdma_create_qp(void *rdma_cxt,

	if (!rdma_cxt || !in_params || !out_params ||
	    !p_hwfn->p_rdma_info->active) {
		DP_ERR(p_hwfn->cdev,
		       "qed roce create qp failed due to NULL entry (rdma_cxt=%p, in=%p, out=%p, roce_info=?\n",
		pr_err("qed roce create qp failed due to NULL entry (rdma_cxt=%p, in=%p, out=%p, roce_info=?\n",
		       rdma_cxt, in_params, out_params);
		return NULL;
	}