From: Eric Sesterhenn Date: Fri, 20 Jan 2006 20:32:56 +0000 (+0300) Subject: [PATCH] acenic: fix checking of read_eeprom_byte() return values X-Git-Tag: v2.6.16-rc2~250^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f9d47220eb2d1b17a0a3ecaf1b564ff95b8393d;p=linux-2.6 [PATCH] acenic: fix checking of read_eeprom_byte() return values tmp in ace_init is u32 thus rendering read_eeprom_byte() return values checks useless. Signed-off-by: Eric Sesterhenn Signed-off-by: Alexey Dobriyan Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index b8953de566..b508812e97 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c @@ -1002,6 +1002,8 @@ static int __devinit ace_init(struct net_device *dev) mac1 = 0; for(i = 0; i < 4; i++) { + int tmp; + mac1 = mac1 << 8; tmp = read_eeprom_byte(dev, 0x8c+i); if (tmp < 0) { @@ -1012,6 +1014,8 @@ static int __devinit ace_init(struct net_device *dev) } mac2 = 0; for(i = 4; i < 8; i++) { + int tmp; + mac2 = mac2 << 8; tmp = read_eeprom_byte(dev, 0x8c+i); if (tmp < 0) {