diff options
author | Ivan Safonov <insafonov@gmail.com> | 2015-11-03 16:48:22 +0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-11-15 20:02:47 -0800 |
commit | f464b3a08cefe3febcd30068d0a7ecd28f085b2d (patch) | |
tree | 2618676fa385789172669f931a63e1e39c9a5470 /drivers/staging/rtl8188eu | |
parent | 8107b147d78ba5f04ed5e809041b17273c1f5a02 (diff) |
staging: rtl8188eu: unnecessary branching removed
If the 'remain' is zero, the loop is not executed at all.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/fw.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 39c5a055fc1b..44e807803a36 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]); } } |