net/qla3xxx: fix an error code in ql_adapter_up()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Dec 2021 08:24:16 +0000 (11:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:57:19 +0000 (10:57 +0100)
commita72723e89f4d339f2900b3163042e360e9719699
tree98075322ad14738e5ab487d5ce2f1d9fa436c0a6
parent0c9f1ab29e7f0714f0c2a83defb1fb4d77ec0853
net/qla3xxx: fix an error code in ql_adapter_up()

commit d17b9737c2bc09b4ac6caf469826e5a7ce3ffab7 upstream.

The ql_wait_for_drvr_lock() fails and returns false, then this
function should return an error code instead of returning success.

The other problem is that the success path prints an error message
netdev_err(ndev, "Releasing driver lock\n");  Delete that and
re-order the code a little to make it more clear.

Fixes: 5a4faa873782 ("[PATCH] qla3xxx NIC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211207082416.GA16110@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qla3xxx.c