[BNX2]: Fix bug in bnx2_nvram_write()
authorMichael Chan <mchan@broadcom.com>
Mon, 22 May 2006 23:38:38 +0000 (16:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2006 23:38:38 +0000 (16:38 -0700)
Fix a bug in bnx2_nvram_write() caused by a counter variable not
correctly incremented by 4.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c

index 5ca99e26660af7f9b32f873e06bd3efd9ea4a313..509f104ec3dbd6655855393b736e8703a32574f7 100644 (file)
@@ -3061,7 +3061,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf,
                }
 
                /* Loop to write the new data from data_start to data_end */
-               for (addr = data_start; addr < data_end; addr += 4, i++) {
+               for (addr = data_start; addr < data_end; addr += 4, i += 4) {
                        if ((addr == page_end - 4) ||
                                ((bp->flash_info->buffered) &&
                                 (addr == data_end - 4))) {