From 13a82e56e50da18db9364616d10d907ebf275b10 Mon Sep 17 00:00:00 2001 From: Shunfeng Yang Date: Thu, 2 Sep 2021 21:27:20 +0800 Subject: [PATCH] RDMA/hns: Fixed wrong judgments in the goto branch mainline inclusion from mainline-v5.12 commit bb74fe7e81c8 category: bugfix bugzilla: NA CVE: NA When an error occurs, the qp_table must be cleared, regardless of whether the SRQ feature is enabled. Signed-off-by: Shunfeng Yang Signed-off-by: Yangyang Li Reviewed-by: chunzhi hu Signed-off-by: Yang Yingliang --- drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index a604e6d93154..f3112683b9b2 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -1316,8 +1316,7 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev) return 0; err_qp_table_free: - if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) - hns_roce_cleanup_qp_table(hr_dev); + hns_roce_cleanup_qp_table(hr_dev); err_cq_table_free: hns_roce_cleanup_cq_table(hr_dev); -- GitLab