diff options
author | Ivan Safonov <insafonov@gmail.com> | 2015-11-03 09:48:22 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-11-16 04:02:47 (GMT) |
commit | f464b3a08cefe3febcd30068d0a7ecd28f085b2d (patch) | |
tree | 2618676fa385789172669f931a63e1e39c9a5470 | |
parent | 8107b147d78ba5f04ed5e809041b17273c1f5a02 (diff) | |
download | linux-f464b3a08cefe3febcd30068d0a7ecd28f085b2d.tar.xz |
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>
-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 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]); } } |