summaryrefslogtreecommitdiff
path: root/drivers/net/e1000.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-10-28 07:37:04 +0200
committerWolfgang Denk <wd@denx.de>2011-11-03 20:33:19 +0100
commit7a341066117f9eb5eb9385f61176ef6a08b90163 (patch)
treeb03f87a066fe3325045b0ab33299df40af3f8c2c /drivers/net/e1000.c
parentce5207e191c59b3135303fd03b98dd2ac3701ba2 (diff)
downloadu-boot-imx-7a341066117f9eb5eb9385f61176ef6a08b90163.zip
u-boot-imx-7a341066117f9eb5eb9385f61176ef6a08b90163.tar.gz
u-boot-imx-7a341066117f9eb5eb9385f61176ef6a08b90163.tar.bz2
e1000: fix bugs from recent commits
Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more information" failed to initialize the checksum variable which should result in random results. Fix that. Commit 2326a94d caused a ton of "unused variable 'x'" warnings. Fix these. While we are at it, remove some bogus parens. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Diffstat (limited to 'drivers/net/e1000.c')
-rw-r--r--drivers/net/e1000.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index c86bf0a..6eab7b2 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -884,6 +884,7 @@ static int e1000_validate_eeprom_checksum(struct e1000_hw *hw)
}
/* Compute the checksum */
+ checksum = 0;
for (i = 0; i < EEPROM_CHECKSUM_REG; i++)
checksum += buf[i];
checksum = ((uint16_t)EEPROM_SUM) - checksum;