[PATCH net-next v1 1/6] tg3: fix possible infinite loop

From: David Decotigny
Date: Fri Dec 16 2011 - 13:25:45 EST


Found by browsing the code.

Tested:
Not tested along the affected path. No regression observed.



Signed-off-by: David Decotigny <decot@xxxxxxxxxxxx>
---
drivers/net/ethernet/broadcom/tg3.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 8bf11ca..e04c4f9 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -13877,8 +13877,10 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
continue;
}
if (pci_id->rev != PCI_ANY_ID) {
- if (bridge->revision > pci_id->rev)
+ if (bridge->revision > pci_id->rev) {
+ pci_id++;
continue;
+ }
}
if (bridge->subordinate &&
(bridge->subordinate->number ==
--
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/