summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-05-15 11:22:26 +0100
committerKalle Valo <kvalo@codeaurora.org>2020-05-18 15:19:17 +0300
commitb0a4bb7693be9cca2811ac468f7f7edaf975dbcf (patch)
treea2e534abd17a1578f6edb73b68bc0ad30a915016 /drivers/net/wireless/realtek
parent3aa42bae9c4d1641aeb36f1a8585cd1d506cf471 (diff)
rtlwifi: rtl8192ee: remove redundant for-loop
The for-loop seems to be redundant, the assignments for indexes 0..2 are being over-written by the last index 3 in the loop. Remove the loop and use index 3 instead. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200515102226.29819-1-colin.king@canonical.com
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index 6dba576aa81e..bb291b951f4d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -2866,14 +2866,12 @@ void rtl92ee_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
}
}
- for (i = 0; i < 4; i++) {
- reg_e94 = result[i][0];
- reg_e9c = result[i][1];
- reg_ea4 = result[i][2];
- reg_eb4 = result[i][4];
- reg_ebc = result[i][5];
- reg_ec4 = result[i][6];
- }
+ reg_e94 = result[3][0];
+ reg_e9c = result[3][1];
+ reg_ea4 = result[3][2];
+ reg_eb4 = result[3][4];
+ reg_ebc = result[3][5];
+ reg_ec4 = result[3][6];
if (final_candidate != 0xff) {
reg_e94 = result[final_candidate][0];