mirror of https://gitee.com/openkylin/linux.git
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: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
2577188edc
commit
3635ac0208
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue