From: Michael Buesch <mb@bu3sch.de>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, Andrew Morton <akpm@osdl.org>, jgarzik@pobox.com
Subject: [PATCH] r8169: Fix iteration variable sign
Date: Wed, 29 Nov 2006 20:48:44 +0100 [thread overview]
Message-ID: <200611292048.45152.mb@bu3sch.de> (raw)
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.
next reply other threads:[~2006-11-29 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 19:48 Michael Buesch [this message]
2006-11-29 21:21 ` [PATCH] r8169: Fix iteration variable sign Francois Romieu
2006-11-30 11:20 ` Jeff Garzik
2006-11-30 14:14 ` Michael Buesch
2006-11-30 18:56 ` Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611292048.45152.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.