IB/mthca: Fix error return code in __mthca_init_one()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 29 Sep 2018 03:55:16 +0000 (03:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:01 +0000 (08:20 +0100)
commite3db306d1fda584d63ea02ac628b1858317b26ab
tree5ced99552ba99861fdfa8581fdee740c3985a1ce
parent1b86b8ad6e4738521378ce6879a7e148c9494cd4
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: 80fd8238734c ("[PATCH] IB/mthca: Encapsulate command interface init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mthca/mthca_main.c