From: Michael Chan Date: Mon, 22 May 2006 23:38:38 +0000 (-0700) Subject: [BNX2]: Fix bug in bnx2_nvram_write() X-Git-Tag: v2.6.17-rc5~16^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae25761c92c5eec781b6ea72bbe7e98fc8382a0;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5ca99e2666..509f104ec3 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))) {