OSDN Git Service

rtlwifi: remove redundant initialization of variable ul_encalgo
authorColin Ian King <colin.i.king@gmail.com>
Sun, 30 Jan 2022 22:37:14 +0000 (22:37 +0000)
committerKalle Valo <kvalo@kernel.org>
Tue, 1 Feb 2022 12:26:34 +0000 (14:26 +0200)
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>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220130223714.6999-1-colin.i.king@gmail.com
drivers/net/wireless/realtek/rtlwifi/cam.c

index 7a0355d..32970ea 100644 (file)
@@ -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) {