From: Peter Korsgaard <jacmet@sunsite.dk>
To: netdev@vger.kernel.org, jeff@garzik.org
Subject: [PATCH] dm9601: Return 0 from bind() on success
Date: Sat, 30 Jun 2007 23:07:42 +0200 [thread overview]
Message-ID: <87y7i1p2w1.fsf@p4.be.48ers.dk> (raw)
Fixup dm9601_bind() so it returns 0 on success rather than just a positive
number, as otherwise usbnet doesn't init the status handler.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/net/usb/dm9601.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6.22-rc6/drivers/net/usb/dm9601.c
===================================================================
--- linux-2.6.22-rc6.orig/drivers/net/usb/dm9601.c
+++ linux-2.6.22-rc6/drivers/net/usb/dm9601.c
@@ -414,18 +414,16 @@
dev->mii.reg_num_mask = 0x1f;
/* reset */
- ret = dm_write_reg(dev, DM_NET_CTRL, 1);
+ dm_write_reg(dev, DM_NET_CTRL, 1);
udelay(20);
/* read MAC */
- ret = dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr);
- if (ret < 0) {
+ if (dm_read(dev, DM_PHY_ADDR, ETH_ALEN, dev->net->dev_addr) < 0) {
printk(KERN_ERR "Error reading MAC address\n");
ret = -ENODEV;
goto out;
}
-
/* power up phy */
dm_write_reg(dev, DM_GPR_CTRL, 1);
dm_write_reg(dev, DM_GPR_DATA, 0);
--
Bye, Peter Korsgaard
next reply other threads:[~2007-06-30 21:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 21:07 Peter Korsgaard [this message]
2007-07-02 12:25 ` [PATCH] dm9601: Return 0 from bind() on success 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=87y7i1p2w1.fsf@p4.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=jeff@garzik.org \
--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).