mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
RDMA/erdma: Fix ignored return value of init_kernel_qp
[ Upstream commit d5c74713f0117d07f91eb48b10bc2ad44e23c9b9 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
76588276fc
commit
acf0dea8dc
@@ -979,7 +979,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;
|
||||
|
||||
Reference in New Issue
Block a user