Skip to content

Commit 5f44044

Browse files
Wenpeng Liangksacilotto
authored andcommitted
RDMA/hns: Fixed wrong judgments in the goto branch
BugLink: https://bugs.launchpad.net/bugs/1918974 [ Upstream commit bb74fe7 ] When an error occurs, the qp_table must be cleared, regardless of whether the SRQ feature is enabled. Fixes: 5c1f167 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
1 parent 9c1fe4c commit 5f44044

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/infiniband/hw/hns/hns_roce_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,7 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev)
842842
return 0;
843843

844844
err_qp_table_free:
845-
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ)
846-
hns_roce_cleanup_qp_table(hr_dev);
845+
hns_roce_cleanup_qp_table(hr_dev);
847846

848847
err_cq_table_free:
849848
hns_roce_cleanup_cq_table(hr_dev);

0 commit comments

Comments
 (0)