From: Ivan Safonov Date: Tue, 3 Nov 2015 09:48:22 +0000 (+0700) Subject: staging: rtl8188eu: unnecessary branching removed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f464b3a08cefe3febcd30068d0a7ecd28f085b2d;p=linux-beck.git staging: rtl8188eu: unnecessary branching removed If the 'remain' is zero, the loop is not executed at all. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- 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]); } }