Commit bae25761 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[BNX2]: Fix bug in bnx2_nvram_write()

Fix a bug in bnx2_nvram_write() caused by a counter variable not
correctly incremented by 4.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 463d305b
...@@ -3061,7 +3061,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, ...@@ -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 */ /* 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) || if ((addr == page_end - 4) ||
((bp->flash_info->buffered) && ((bp->flash_info->buffered) &&
(addr == data_end - 4))) { (addr == data_end - 4))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment