mirror of https://gitee.com/openkylin/linux.git
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: 80fd823873
("[PATCH] IB/mthca: Encapsulate command interface init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
e73798f20e
commit
39f2495618
|
@ -986,7 +986,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
|
||||||
goto err_free_dev;
|
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");
|
mthca_err(mdev, "Failed to init command interface, aborting.\n");
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue