]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:18 +0000 (09:49 +0100)
commit94f8d354f50a359d376864217fcfb7057e5f2253
treeecf7f6bd6e3fa2f1f31b683285eca87a29d80cc3
parent4e4a618c75fa1cfd1bc14a19d749faffa5b68e67
net/qla3xxx: fix an error code in ql_adapter_up()

BugLink: https://bugs.launchpad.net/bugs/1954931
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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/qlogic/qla3xxx.c