summaryrefslogtreecommitdiff
path: root/drivers/staging/rtlwifi
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-11-08 16:30:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-27 11:20:40 +0300
commit6b549e20b63421e8655f7fe3612de414ec16ee2a (patch)
treec7434fe130364e02bd4815a0f906a813783134f7 /drivers/staging/rtlwifi
parent15bfaf777712f62e5d0c99b78e27978dab9a56c1 (diff)
downloadlinux-6b549e20b63421e8655f7fe3612de414ec16ee2a.tar.xz
staging: rtlwifi: remove redundant assignments to ul_enc_algo
Variable ul_enc_algo is being initialized with a value that is never read, it is being set again in the following switch statements in all of the case and default paths. Hence the unitialization is redundant and can be removed. Cleans up two clang warnings: Value stored to 'ul_enc_algo' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtlwifi')
-rw-r--r--drivers/staging/rtlwifi/cam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtlwifi/cam.c b/drivers/staging/rtlwifi/cam.c
index 9c8c907cb48e..ca1c9e36d976 100644
--- a/drivers/staging/rtlwifi/cam.c
+++ b/drivers/staging/rtlwifi/cam.c
@@ -181,7 +181,7 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
u32 ul_command;
u32 ul_content;
- u32 ul_enc_algo = rtlpriv->cfg->maps[SEC_CAM_AES];
+ u32 ul_enc_algo;
switch (rtlpriv->sec.pairwise_enc_algorithm) {
case WEP40_ENCRYPTION:
@@ -221,7 +221,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) {