[PATCH 4/4] staging: rtl8188eu: use break to exit while loop
From: Michael Straube
Date: Wed Sep 26 2018 - 16:04:27 EST
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@xxxxxxxxx>
---
drivers/staging/rtl8188eu/core/rtw_efuse.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index ca0217881eb4..4988d97ca0d1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -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;
}
}
--
2.19.0