Skip to content

Commit 315917d

Browse files
Francois RomieuLinus Torvalds
authored andcommitted
[PATCH] r8169: Fix iteration variable sign
This changes the type of variable "i" in rtl8169_init_one() from "unsigned int" to "int". "i" is checked for < 0 later, which can never happen for "unsigned". This results in broken error handling. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent af768c6 commit 315917d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/r8169.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
14731473
struct rtl8169_private *tp;
14741474
struct net_device *dev;
14751475
void __iomem *ioaddr;
1476-
unsigned int i, pm_cap;
1477-
int rc;
1476+
unsigned int pm_cap;
1477+
int i, rc;
14781478

14791479
if (netif_msg_drv(&debug)) {
14801480
printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",

0 commit comments

Comments
 (0)