staging: r8188eu: Fix while-loop that iterates only once
[linux-2.6-microblaze.git] / drivers / staging / rtl8188eu / hal / rtl8188e_hal_init.c
index d108669..1c63658 100644 (file)
@@ -168,14 +168,14 @@ void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
 static s32 _LLTWrite(struct adapter *padapter, u32 address, u32 data)
 {
        s32     status = _SUCCESS;
-       s32     count = 0;
+       s32     count;
        u32     value = _LLT_INIT_ADDR(address) | _LLT_INIT_DATA(data) | _LLT_OP(_LLT_WRITE_ACCESS);
        u16     LLTReg = REG_LLT_INIT;
 
        usb_write32(padapter, LLTReg, value);
 
        /* polling */
-       do {
+       for (count = 0; ; count++) {
                value = usb_read32(padapter, LLTReg);
                if (_LLT_OP_VALUE(value) == _LLT_NO_ACTIVE)
                        break;
@@ -185,7 +185,7 @@ static s32 _LLTWrite(struct adapter *padapter, u32 address, u32 data)
                        break;
                }
                udelay(5);
-       } while (count++);
+       }
 
        return status;
 }