All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: remove redundant initialization of variable ul_encalgo
@ 2022-01-30 22:37 Colin Ian King
  2022-01-31  2:53 ` Pkshih
  2022-02-01 12:26 ` Kalle Valo
  0 siblings, 2 replies; 9+ messages in thread
From: Colin Ian King @ 2022-01-30 22:37 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, David S . Miller, Jakub Kicinski,
	linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

Variable ul_encalgo is initialized with a value that is never read,
it is being re-assigned a new value in every case in the following
switch statement. The initialization is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/wireless/realtek/rtlwifi/cam.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/cam.c b/drivers/net/wireless/realtek/rtlwifi/cam.c
index 7a0355dc6bab..32970ea4b4e7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/cam.c
+++ b/drivers/net/wireless/realtek/rtlwifi/cam.c
@@ -208,7 +208,7 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
 
 	u32 ul_command;
 	u32 ul_content;
-	u32 ul_encalgo = rtlpriv->cfg->maps[SEC_CAM_AES];
+	u32 ul_encalgo;
 	u8 entry_i;
 
 	switch (rtlpriv->sec.pairwise_enc_algorithm) {
-- 
2.34.1


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

end of thread, other threads:[~2022-02-02 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 22:37 [PATCH] rtlwifi: remove redundant initialization of variable ul_encalgo Colin Ian King
2022-01-31  2:53 ` Pkshih
2022-02-01 12:22   ` Kalle Valo
2022-02-02  5:02   ` Dan Carpenter
2022-02-02 10:10     ` Joe Perches
2022-02-02 11:05       ` Dan Carpenter
2022-02-02 11:21         ` Joe Perches
2022-02-02 11:44           ` Dan Carpenter
2022-02-01 12:26 ` 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.