]> git.baikalelectronics.ru Git - kernel.git/commitdiff
staging: rtl8723bs: core: remove redundant zero'ing of counter variable k
authorColin Ian King <colin.king@canonical.com>
Sun, 23 Feb 2020 15:28:40 +0000 (15:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Feb 2020 18:20:49 +0000 (19:20 +0100)
The zero'ing of counter variable k is redundant as it is never read
after breaking out of the while loop. Remove it.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200223152840.418439-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_efuse.c

index 3b8848182221fc8b3c1ec5609eca7f433cf27b7f..bdb6ff8aab7dc474db56b8975e802bb8316ae171 100644 (file)
@@ -244,10 +244,8 @@ u16        Address)
                while (!(Bytetemp & 0x80)) {
                        Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
                        k++;
-                       if (k == 1000) {
-                               k = 0;
+                       if (k == 1000)
                                break;
-                       }
                }
                return rtw_read8(Adapter, EFUSE_CTRL);
        } else