Commit 39f24956 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jason Gunthorpe

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: 80fd8238 ("[PATCH] IB/mthca: Encapsulate command interface init")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent e73798f2
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment