]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8188eu: assigning a value to the variable is replaced by the increment
authorIvan Safonov <insafonov@gmail.com>
Tue, 3 Nov 2015 09:45:00 +0000 (16:45 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
It is made to the initial value could be placed in the offset variable.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/fw.c

index af93697a6ab9c44110bffc09ea2e30a914a1c164..70825e05fae9b4934d06dd110770872bc2385bd5 100644 (file)
@@ -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) {