diff mbox series

rtlwifi: rtl8723ae: remove redundant initialization of variable rtstatus

Message ID 20210513122410.59204-1-colin.king@canonical.com
State New
Headers show
Series rtlwifi: rtl8723ae: remove redundant initialization of variable rtstatus | expand

Commit Message

Colin King May 13, 2021, 12:24 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable rtstatus is being initialized with a value that is never
read, it is being updated later on. The assignment 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/rtl8723ae/hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo June 15, 2021, 1:39 p.m. UTC | #1
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>

> 

> The variable rtstatus is being initialized with a value that is never

> read, it is being updated later on. The assignment 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.

03a1b938cf39 rtlwifi: rtl8723ae: remove redundant initialization of variable rtstatus

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210513122410.59204-1-colin.king@canonical.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
index f8a1de6e9849..c98f2216734f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
@@ -915,7 +915,7 @@  int rtl8723e_hw_init(struct ieee80211_hw *hw)
 	struct rtl_phy *rtlphy = &(rtlpriv->phy);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
-	bool rtstatus = true;
+	bool rtstatus;
 	int err;
 	u8 tmp_u1b;
 	unsigned long flags;