Explorar el Código

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>
Lijun Ou hace 7 años
padre
commit
3635ac0208
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      drivers/infiniband/hw/hns/hns_roce_main.c

+ 1 - 2
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");
 	}