Commit 48e6020b authored by Junxian Huang's avatar Junxian Huang
Browse files

RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBSE4C



----------------------------------------------------------------------

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: 0f00571f ("RDMA/hns: Use new SQ doorbell register for HIP09")
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent 3e2b4d4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1434,7 +1434,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,
				       min(udata->outlen, sizeof(resp)));
		if (ret) {
			ibdev_err(ibdev, "copy qp resp failed!\n");
			goto err_store;
			goto err_flow_ctrl;
		}
	}