mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-14 11:19:08 +10:00
RDMA/erdma: Fix ignored return value of init_kernel_qp
The init_kernel_qp interface may fail. Check its return value and free
related resources properly when it does.
Fixes: 1550557717
("RDMA/erdma: Add verbs implementation")
Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com>
Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com>
Link: https://patch.msgid.link/20250725055410.67520-3-boshiyu@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
3c3e9a9f29
commit
d5c74713f0
@ -1031,7 +1031,9 @@ int erdma_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attrs,
|
||||
if (ret)
|
||||
goto err_out_cmd;
|
||||
} else {
|
||||
init_kernel_qp(dev, qp, attrs);
|
||||
ret = init_kernel_qp(dev, qp, attrs);
|
||||
if (ret)
|
||||
goto err_out_xa;
|
||||
}
|
||||
|
||||
qp->attrs.max_send_sge = attrs->cap.max_send_sge;
|
||||
|
Loading…
Reference in New Issue
Block a user