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>
This commit is contained in:
Ivan Safonov 2015-11-03 16:48:22 +07:00 committed by Greg Kroah-Hartman
parent 8107b147d7
commit f464b3a08c

View file

@ -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]);
}
}