Skip to content

Commit

Permalink
RDMA/hns: Do not overwrite the error code during error unwind in hns_…
Browse files Browse the repository at this point in the history
…roce_init

When init cmq fail in initial flow of RoCE, it should return the errno of
cmq_init function, not of the rest call.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Lijun Ou authored and Jason Gunthorpe committed Jul 26, 2018
1 parent 2577188 commit 3635ac0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/hw/hns/hns_roce_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,7 @@ int hns_roce_init(struct hns_roce_dev *hr_dev)

error_failed_cmq_init:
if (hr_dev->hw->reset) {
ret = hr_dev->hw->reset(hr_dev, false);
if (ret)
if (hr_dev->hw->reset(hr_dev, false))
dev_err(dev, "Dereset RoCE engine failed!\n");
}

Expand Down

0 comments on commit 3635ac0

Please sign in to comment.