Skip to content

Commit

Permalink
[PATCH] r8169: Fix iteration variable sign
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Francois Romieu authored and Linus Torvalds committed Nov 29, 2006
1 parent af768c6 commit 315917d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,8 +1473,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
struct rtl8169_private *tp;
struct net_device *dev;
void __iomem *ioaddr;
unsigned int i, pm_cap;
int rc;
unsigned int pm_cap;
int i, rc;

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

0 comments on commit 315917d

Please sign in to comment.