* [PATCH] rtlwifi: remove redundant assignment to variable err
@ 2021-03-27 23:00 Colin King
2021-04-17 17:29 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-03-27 23:00 UTC (permalink / raw)
To: Ping-Ke Shih, Kalle Valo, David S . Miller, Jakub Kicinski,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/net/wireless/realtek/rtlwifi/usb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 6c5e242b1bc5..37a9a03123f3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -1070,7 +1070,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;
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtlwifi: remove redundant assignment to variable err
2021-03-27 23:00 [PATCH] rtlwifi: remove redundant assignment to variable err Colin King
@ 2021-04-17 17:29 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-04-17 17:29 UTC (permalink / raw)
To: Colin King
Cc: Ping-Ke Shih, David S . Miller, Jakub Kicinski, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Patch applied to wireless-drivers-next.git, thanks.
87431bc1f0f6 rtlwifi: remove redundant assignment to variable err
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210327230014.25554-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-17 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 23:00 [PATCH] rtlwifi: remove redundant assignment to variable err Colin King
2021-04-17 17:29 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.