Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3635ac02 authored by Lijun Ou's avatar Lijun Ou Committed by Jason Gunthorpe
Browse files

RDMA/hns: Do not overwrite the error code during error unwind in hns_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: default avatarLijun Ou <oulijun@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 2577188e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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");
	}