]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dm9601: Return 0 from bind() on success
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 30 Jun 2007 21:07:42 +0000 (23:07 +0200)
committerJeff Garzik <jeff@garzik.org>
Mon, 2 Jul 2007 12:24:51 +0000 (08:24 -0400)
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>
drivers/net/usb/dm9601.c

index ac200b0f6a923d124f31d80ced0b07ddfaeba129..16c7a0e878505a7b229817012de9e3f2b3eab50c 100644 (file)
@@ -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);