Skip to content

Commit 444907d

Browse files
Junxian Huangrleon
authored andcommitted
RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()
When ib_copy_to_udata() fails in hns_roce_create_qp_common(), hns_roce_qp_remove() should be called in the error path to clean up resources in hns_roce_qp_store(). Fixes: 0f00571 ("RDMA/hns: Use new SQ doorbell register for HIP09") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20250311084857.3803665-6-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 13c90c2 commit 444907d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,
12201220
min(udata->outlen, sizeof(resp)));
12211221
if (ret) {
12221222
ibdev_err(ibdev, "copy qp resp failed!\n");
1223-
goto err_store;
1223+
goto err_flow_ctrl;
12241224
}
12251225
}
12261226

0 commit comments

Comments
 (0)