From: Peter Korsgaard <jacmet@sunsite.dk>
To: netdev@vger.kernel.org
Cc: dbrownell@users.sourceforge.net
Subject: [PATCH] Cleanup usbnet_probe() return value handling
Date: Mon, 02 Jul 2007 17:40:17 +0200 [thread overview]
Message-ID: <87lkdyx19a.fsf@nanv.dk> (raw)
usbnet_probe() handles a positive return value from the driver bind()
function as success, but will later only setup the status handler if the
return value was zero, leading to confusion. Patch adjusts this to only
accept 0 as success in both checks.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/net/usb/usbnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.22-rc7/drivers/net/usb/usbnet.c
===================================================================
--- linux-2.6.22-rc7.orig/drivers/net/usb/usbnet.c
+++ linux-2.6.22-rc7/drivers/net/usb/usbnet.c
@@ -1182,7 +1182,7 @@
// NOTE net->name still not usable ...
if (info->bind) {
status = info->bind (dev, udev);
- if (status < 0)
+ if (status != 0)
goto out1;
// heuristic: "usb%d" for links we know are two-host,
--
Bye, Peter Korsgaard
next reply other threads:[~2007-07-02 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 15:40 Peter Korsgaard [this message]
2007-07-02 16:14 ` [PATCH] Cleanup usbnet_probe() return value handling David Brownell
2007-07-02 22:46 ` Peter Korsgaard
2007-07-04 4:34 ` David Brownell
2007-07-10 16:42 ` Jeff Garzik
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=87lkdyx19a.fsf@nanv.dk \
--to=jacmet@sunsite.dk \
--cc=dbrownell@users.sourceforge.net \
--cc=netdev@vger.kernel.org \
/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 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).