diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2007-06-30 23:07:42 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-02 08:24:51 -0400 |
commit | b8f59586cecdb612cd31f4d9e7904f46277ddd64 (patch) | |
tree | 0b2ba951170c07133abc8f1c2d2955a44beb0257 /drivers/net/usb/dm9601.c | |
parent | 043600a62a45b2d5cac262fca9012fc24db19964 (diff) | |
download | blackbird-op-linux-b8f59586cecdb612cd31f4d9e7904f46277ddd64.tar.gz blackbird-op-linux-b8f59586cecdb612cd31f4d9e7904f46277ddd64.zip |
dm9601: Return 0 from bind() on success
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/usb/dm9601.c')
-rw-r--r-- | drivers/net/usb/dm9601.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index ac200b0f6a92..16c7a0e87850 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -414,18 +414,16 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) 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); |