]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtlwifi: remove redundant assignment to variable err
authorColin Ian King <colin.king@canonical.com>
Sat, 27 Mar 2021 23:00:14 +0000 (23:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:46:45 +0000 (12:46 +0100)
[ Upstream commit 87431bc1f0f67aa2d23ca1b9682fe54f68549d42 ]

Variable err is assigned -ENODEV followed by an error return path
via label error_out that does not access the variable and returns
with the -ENODEV error return code. The assignment to err is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210327230014.25554-1-colin.king@canonical.com
Stable-dep-of: b4b26642b31e ("wifi: rtlwifi: wait for firmware loading before releasing memory")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtlwifi/usb.c

index 7e4655de30237e695a669427ac65a39a1200abfa..add6da1ce3602e1c9443884d9bf7676f955412e8 100644 (file)
@@ -1072,7 +1072,6 @@ int rtl_usb_probe(struct usb_interface *intf,
        err = ieee80211_register_hw(hw);
        if (err) {
                pr_err("Can't register mac80211 hw.\n");
-               err = -ENODEV;
                goto error_out;
        }
        rtlpriv->mac80211.mac80211_registered = 1;