forked from Minki/linux
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:
parent
8107b147d7
commit
f464b3a08c
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user