]> git.baikalelectronics.ru Git - kernel.git/commitdiff
rtlwifi: remove redundant assignment to variable k
authorColin Ian King <colin.king@canonical.com>
Fri, 31 May 2019 14:14:12 +0000 (15:14 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 25 Jun 2019 05:00:13 +0000 (08:00 +0300)
The assignment of 0 to variable k is never read once we break out of
the loop, so the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/efuse.c

index 37ab582a8afb201e02408d4b2e66bb20e6f7623e..ea4fc53764de3cc5b1842f5cb1d15b38e32c7eea 100644 (file)
@@ -117,10 +117,8 @@ u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address)
                                                 rtlpriv->cfg->
                                                 maps[EFUSE_CTRL] + 3);
                        k++;
-                       if (k == 1000) {
-                               k = 0;
+                       if (k == 1000)
                                break;
-                       }
                }
                data = rtl_read_byte(rtlpriv, rtlpriv->cfg->maps[EFUSE_CTRL]);
                return data;