Skip to content

Commit f2ab2ac

Browse files
Wenpeng Lianggregkh
authored andcommitted
RDMA/hns: Fixed wrong judgments in the goto branch
[ 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>
1 parent b11abc7 commit f2ab2ac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/infiniband/hw/hns/hns_roce_main.c

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

783783
err_qp_table_free:
784-
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ)
785-
hns_roce_cleanup_qp_table(hr_dev);
784+
hns_roce_cleanup_qp_table(hr_dev);
786785

787786
err_cq_table_free:
788787
hns_roce_cleanup_cq_table(hr_dev);

0 commit comments

Comments
 (0)