summaryrefslogtreecommitdiff
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-05-22 16:38:38 -0700
committerDavid S. Miller <davem@davemloft.net>2006-05-22 16:38:38 -0700
commitbae25761c92c5eec781b6ea72bbe7e98fc8382a0 (patch)
treeb4a12d158a425a695272761f02d2c0eb87838ee8 /drivers/net/bnx2.c
parent463d305bc51b8f5d0750a17ec0c9caf5181ec6d4 (diff)
downloadlinux-3.10-bae25761c92c5eec781b6ea72bbe7e98fc8382a0.tar.gz
linux-3.10-bae25761c92c5eec781b6ea72bbe7e98fc8382a0.tar.bz2
linux-3.10-bae25761c92c5eec781b6ea72bbe7e98fc8382a0.zip
[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: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5ca99e26660..509f104ec3d 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -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))) {