If the 'remain' is zero, the loop is not executed at all.

Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
 drivers/staging/rtl8188eu/hal/fw.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/fw.c 
b/drivers/staging/rtl8188eu/hal/fw.c
index 39c5a05..44e8078 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -72,11 +72,9 @@ static void _rtl88e_fw_block_write(struct adapter *adapt,
                offset += blk_sz;
        }
 
-       if (remain) {
-               buf_ptr += blk_cnt * blk_sz;
-               for (i = 0; i < remain; i++) {
-                       usb_write8(adapt, offset + i, buf_ptr[i]);
-               }
+       buf_ptr += blk_cnt * blk_sz;
+       for (i = 0; i < remain; i++) {
+               usb_write8(adapt, offset + i, buf_ptr[i]);
        }
 }
 
-- 
2.4.10

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to