From f464b3a08cefe3febcd30068d0a7ecd28f085b2d Mon Sep 17 00:00:00 2001 From: Ivan Safonov Date: Tue, 3 Nov 2015 16:48:22 +0700 Subject: [PATCH] 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 --- drivers/staging/rtl8188eu/hal/fw.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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]); } } -- 2.39.5