summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns/hns_roce_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_main.c')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 0e558b537569..2d79cf64008b 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -750,14 +750,8 @@ static int hns_roce_setup_hca(struct hns_roce_dev *hr_dev)
hns_roce_init_pd_table(hr_dev);
- if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) {
- ret = hns_roce_init_xrcd_table(hr_dev);
- if (ret) {
- dev_err(dev, "failed to init xrcd table, ret = %d.\n",
- ret);
- goto err_pd_table_free;
- }
- }
+ if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC)
+ hns_roce_init_xrcd_table(hr_dev);
hns_roce_init_mr_table(hr_dev);
@@ -788,9 +782,8 @@ err_cq_table_free:
ida_destroy(&hr_dev->mr_table.mtpt_ida.ida);
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC)
- hns_roce_cleanup_xrcd_table(hr_dev);
+ ida_destroy(&hr_dev->xrcd_ida.ida);
-err_pd_table_free:
ida_destroy(&hr_dev->pd_ida.ida);
hns_roce_uar_free(hr_dev, &hr_dev->priv_uar);