Skip to content

Commit

Permalink
qed: Fix null-pointer dereference in qed_rdma_create_qp()
Browse files Browse the repository at this point in the history
Fix a possible null-pointer dereference in qed_rdma_create_qp().

Changes from V2:
- Revert checkpatch fixes.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shai Malin authored and David S. Miller committed Aug 16, 2021
1 parent 3711023 commit d33d19d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/qlogic/qed/qed_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,8 +1285,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;
}
Expand Down

0 comments on commit d33d19d

Please sign in to comment.