[PATCH 02/14] staging: rtl8188eu: assigning a value to the variable is replaced by the increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is made to the initial value could be placed in the offset variable.

Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>
---
 drivers/staging/rtl8188eu/hal/fw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index af93697..70825e0 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) {
-- 
2.4.10

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux