From: oulijun Date: Tue, 30 Jan 2018 12:20:45 +0000 (+0800) Subject: RDMA/hns: Fix misplaced call to hns_roce_cleanup_hem_table X-Git-Tag: v4.16-rc1~58^2~24 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0da6550366b8d3a221d4a927e56efec82049d518;p=linux.git RDMA/hns: Fix misplaced call to hns_roce_cleanup_hem_table 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 Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index aa0c242ddc50..46f065ddd6c0 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -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);