aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_main.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-09-29 03:55:16 +0000
committerJason Gunthorpe <jgg@mellanox.com>2018-10-03 16:02:10 -0600
commit39f2495618c5e980d2873ea3f2d1877dd253e07a (patch)
tree590adedc3de02f3430864ca69a8bcdc0d78413bd /drivers/infiniband/hw/mthca/mthca_main.c
parentRDMA/uverbs: Fix RCU annotation for radix slot deference (diff)
downloadlinux-dev-39f2495618c5e980d2873ea3f2d1877dd253e07a.tar.xz
linux-dev-39f2495618c5e980d2873ea3f2d1877dd253e07a.zip
IB/mthca: Fix error return code in __mthca_init_one()
Fix to return a negative error code from the mthca_cmd_init() error handling case instead of 0, as done elsewhere in this function. Fixes: 80fd8238734c ("[PATCH] IB/mthca: Encapsulate command interface init") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index f99c7e0b234c..92c49bff22bc 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -986,7 +986,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
goto err_free_dev;
}
- if (mthca_cmd_init(mdev)) {
+ err = mthca_cmd_init(mdev);
+ if (err) {
mthca_err(mdev, "Failed to init command interface, aborting.\n");
goto err_free_dev;
}