diff options
| author | Wenpeng Liang <[email protected]> | 2021-01-30 16:58:02 +0800 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-02-08 19:37:34 -0400 |
| commit | bb74fe7e81c8b2b65c6a351a247fdb9a969cbaec (patch) | |
| tree | 5018f7f8b1f4b105b33c54d2cba530594fa10891 | |
| parent | b5df9b7a2f965b7903850d8f89846ffe0080b84b (diff) | |
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/[email protected]
Signed-off-by: Wenpeng Liang <[email protected]>
Signed-off-by: Weihang Li <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
| -rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_main.c | 3 |
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); |