From: Ivan Safonov Date: Tue, 3 Nov 2015 09:45:00 +0000 (+0700) Subject: staging: rtl8188eu: assigning a value to the variable is replaced by the increment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d44f58f7c5c737c6f95f3adf4af00a4a19746d9f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8188eu: assigning a value to the variable is replaced by the increment It is made to the initial value could be placed in the offset variable. 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 af93697a6ab9..70825e05fae9 100644 --- a/drivers/staging/rtl8188eu/hal/fw.c +++ b/drivers/staging/rtl8188eu/hal/fw.c @@ -65,10 +65,12 @@ static void _rtl88e_fw_block_write(struct adapter *adapt, blk_cnt = size / blk_sz; remain = size % blk_sz; + offset = 0; + for (i = 0; i < blk_cnt; i++) { - offset = i * blk_sz; usb_write32(adapt, (FW_8192C_START_ADDRESS + offset), pu4BytePtr[i]); + offset += blk_sz; } if (remain) {