All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: btcoex: remove redundant initialization of variables ant_num and single_ant_path
@ 2020-07-23 16:32 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2020-07-23 16:32 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>

The variables ant_num and single_ant_path are being initialized with a
value that is never read and are being updated later with a new value.
The initializations are redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index a4940a3842de..4949f99844b5 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -1318,7 +1318,7 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
 {
 	struct rtl_priv *rtlpriv = adapter;
 	struct btc_coexist *btcoexist = rtl_btc_coexist(rtlpriv);
-	u8 ant_num = 2, chip_type, single_ant_path = 0;
+	u8 ant_num, chip_type, single_ant_path;
 
 	if (!btcoexist)
 		return false;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-02 14:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 16:32 [PATCH] rtlwifi: btcoex: remove redundant initialization of variables ant_num and single_ant_path Colin King
2020-07-23 16:32 ` Colin King
2020-07-24  5:14 ` Pkshih
2020-07-24  5:14   ` [PATCH] rtlwifi: btcoex: remove redundant initialization of variables ant_num and single_ant_pat Pkshih
2020-08-02 14:54 ` [PATCH] rtlwifi: btcoex: remove redundant initialization of variables ant_num and single_ant_path Kalle Valo
2020-08-02 14:54   ` [PATCH] rtlwifi: btcoex: remove redundant initialization of variables 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.