Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 312efa12 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

IB/mthca: Fix error return code in __mthca_init_one()



[ Upstream commit 39f2495618c5e980d2873ea3f2d1877dd253e07a ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fe92d894
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -989,7 +989,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;
	}