staging: rtl8188eu: use break to exit while loop
authorMichael Straube <straube.linux@gmail.com>
Wed, 26 Sep 2018 20:04:08 +0000 (22:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Sep 2018 12:30:52 +0000 (14:30 +0200)
The variable bContinual is only used to break out of the while loop.
Remove the variable and use break instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_efuse.c

index ca02178..4988d97 100644 (file)
@@ -360,15 +360,13 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e
 
 static u16 Efuse_GetCurrentSize(struct adapter *pAdapter)
 {
-       int     bContinual = true;
        u16     efuse_addr = 0;
        u8 hoffset = 0, hworden = 0;
        u8 efuse_data, word_cnts = 0;
 
        rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
 
-       while (bContinual &&
-              efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) &&
+       while (efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) &&
               AVAILABLE_EFUSE_ADDR(efuse_addr)) {
                if (efuse_data != 0xFF) {
                        if ((efuse_data&0x1F) == 0x0F) {                /* extended header */
@@ -390,7 +388,7 @@ static u16 Efuse_GetCurrentSize(struct adapter *pAdapter)
                        /* read next header */
                        efuse_addr = efuse_addr + (word_cnts*2)+1;
                } else {
-                       bContinual = false;
+                       break;
                }
        }