diff options
-rw-r--r-- | drivers/net/tg3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6fd5cf055830..8f7160812e06 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -10487,14 +10487,16 @@ static int tg3_test_nvram(struct tg3 *tp) | |||
10487 | goto out; | 10487 | goto out; |
10488 | } | 10488 | } |
10489 | 10489 | ||
10490 | err = -EIO; | ||
10491 | |||
10490 | /* Bootstrap checksum at offset 0x10 */ | 10492 | /* Bootstrap checksum at offset 0x10 */ |
10491 | csum = calc_crc((unsigned char *) buf, 0x10); | 10493 | csum = calc_crc((unsigned char *) buf, 0x10); |
10492 | if (csum != be32_to_cpu(buf[0x10/4])) | 10494 | if (csum != le32_to_cpu(buf[0x10/4])) |
10493 | goto out; | 10495 | goto out; |
10494 | 10496 | ||
10495 | /* Manufacturing block starts at offset 0x74, checksum at 0xfc */ | 10497 | /* Manufacturing block starts at offset 0x74, checksum at 0xfc */ |
10496 | csum = calc_crc((unsigned char *) &buf[0x74/4], 0x88); | 10498 | csum = calc_crc((unsigned char *) &buf[0x74/4], 0x88); |
10497 | if (csum != be32_to_cpu(buf[0xfc/4])) | 10499 | if (csum != le32_to_cpu(buf[0xfc/4])) |
10498 | goto out; | 10500 | goto out; |
10499 | 10501 | ||
10500 | err = 0; | 10502 | err = 0; |