aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLijun Ou <oulijun@huawei.com>2018-07-25 15:29:31 +0800
committerJason Gunthorpe <jgg@mellanox.com>2018-07-26 16:48:48 -0600
commit3635ac020842d37d207570891cb901afa653e55d (patch)
treed711ce2cf1a026107e9ccb14144e966f5c7a0fc8 /drivers
parentIB/mlx5: avoid excessive warning msgs when creating VFs on 2nd port (diff)
downloadlinux-dev-3635ac020842d37d207570891cb901afa653e55d.tar.xz
linux-dev-3635ac020842d37d207570891cb901afa653e55d.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 850032de8676..3ea2182a3334 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -886,8 +886,7 @@ error_failed_cmd_init:
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");
}