netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r8169: Fix iteration variable sign
@ 2006-11-29 19:48 Michael Buesch
  2006-11-29 21:21 ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Buesch @ 2006-11-29 19:48 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, Andrew Morton, jgarzik

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>

Index: linux-2.6/drivers/net/r8169.c
===================================================================
--- linux-2.6.orig/drivers/net/r8169.c	2006-11-04 19:03:28.000000000 +0100
+++ linux-2.6/drivers/net/r8169.c	2006-11-29 20:41:59.000000000 +0100
@@ -1473,8 +1473,8 @@ rtl8169_init_one(struct pci_dev *pdev, c
 	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",

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-30 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 19:48 [PATCH] r8169: Fix iteration variable sign Michael Buesch
2006-11-29 21:21 ` Francois Romieu
2006-11-30 11:20   ` Jeff Garzik
2006-11-30 14:14     ` Michael Buesch
2006-11-30 18:56     ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).