]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/hns: Fix misplaced call to hns_roce_cleanup_hem_table
authoroulijun <oulijun@huawei.com>
Tue, 30 Jan 2018 12:20:45 +0000 (20:20 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 1 Feb 2018 22:24:32 +0000 (15:24 -0700)
The mtt_table is cleaned up during the err_unmap_cqe label, it is a
mistake to duplicate the cleanup during the later unwind labels.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_main.c

index aa0c242ddc50055cd6786ef5da74a995d7d314b2..46f065ddd6c03dcbe08dc275fabd0cf3bfa4279a 100644 (file)
@@ -636,7 +636,6 @@ static int hns_roce_init_hem(struct hns_roce_dev *hr_dev)
        hns_roce_cleanup_hem_table(hr_dev, &hr_dev->mr_table.mtpt_table);
 
 err_unmap_mtt:
-       hns_roce_cleanup_hem_table(hr_dev, &hr_dev->mr_table.mtt_table);
        if (hns_roce_check_whether_mhop(hr_dev, HEM_TYPE_CQE))
                hns_roce_cleanup_hem_table(hr_dev,
                                           &hr_dev->mr_table.mtt_cqe_table);