summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorWenpeng Liang <liangwenpeng@huawei.com>2021-01-30 09:58:02 +0100
committerJason Gunthorpe <jgg@nvidia.com>2021-02-09 00:37:34 +0100
commitbb74fe7e81c8b2b65c6a351a247fdb9a969cbaec (patch)
tree5018f7f8b1f4b105b33c54d2cba530594fa10891 /drivers/infiniband/hw/hns
parentRDMA/hns: Force srq_limit to 0 when creating SRQ (diff)
downloadlinux-bb74fe7e81c8b2b65c6a351a247fdb9a969cbaec.tar.xz
linux-bb74fe7e81c8b2b65c6a351a247fdb9a969cbaec.zip
RDMA/hns: Fixed wrong judgments in the goto branch
When an error occurs, the qp_table must be cleared, regardless of whether the SRQ feature is enabled. Fixes: 5c1f167af112 ("RDMA/hns: Init SRQ table for hip08") Link: https://lore.kernel.org/r/1611997090-48820-5-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 2b78b1ff63d3..79782209dbb5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -768,8 +768,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);