From: Michael Chan Date: Mon, 22 May 2006 23:38:38 +0000 (-0700) Subject: [BNX2]: Fix bug in bnx2_nvram_write() X-Git-Tag: MMI-PSA29.97-13-9~49666^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bae25761c92c5eec781b6ea72bbe7e98fc8382a0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 5ca99e26660a..509f104ec3db 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))) {