mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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
1 changed files with 3 additions and 5 deletions
|
@ -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 a new issue