diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0d06e4007f44..5fccbe459949 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -12590,19 +12590,18 @@ static void __devinit tg3_read_partno(struct tg3 *tp) | |||
12590 | unsigned int block_end; | 12590 | unsigned int block_end; |
12591 | 12591 | ||
12592 | if (val == 0x82 || val == 0x91) { | 12592 | if (val == 0x82 || val == 0x91) { |
12593 | i = (i + 3 + | 12593 | i += PCI_VPD_LRDT_TAG_SIZE + |
12594 | (vpd_data[i + 1] + | 12594 | pci_vpd_lrdt_size(&vpd_data[i]); |
12595 | (vpd_data[i + 2] << 8))); | ||
12596 | continue; | 12595 | continue; |
12597 | } | 12596 | } |
12598 | 12597 | ||
12599 | if (val != 0x90) | 12598 | if (val != 0x90) |
12600 | goto out_not_found; | 12599 | goto out_not_found; |
12601 | 12600 | ||
12602 | block_end = (i + 3 + | 12601 | block_end = i + PCI_VPD_LRDT_TAG_SIZE + |
12603 | (vpd_data[i + 1] + | 12602 | pci_vpd_lrdt_size(&vpd_data[i]); |
12604 | (vpd_data[i + 2] << 8))); | 12603 | |
12605 | i += 3; | 12604 | i += PCI_VPD_LRDT_TAG_SIZE; |
12606 | 12605 | ||
12607 | if (block_end > TG3_NVM_VPD_LEN) | 12606 | if (block_end > TG3_NVM_VPD_LEN) |
12608 | goto out_not_found; | 12607 | goto out_not_found; |