On 12/13/06, David Brownell <[EMAIL PROTECTED]> wrote:
> This cleans up some unlikely error handling paths in usbnet device probing.
>
> Signed-off-by: David Brownell <[EMAIL PROTECTED]>
>
> Index: g26/drivers/usb/net/usbnet.c
> ===================================================================
> --- g26.orig/drivers/usb/net/usbnet.c 2006-12-13 12:32:15.000000000 -0800
> +++ g26/drivers/usb/net/usbnet.c 2006-12-13 12:32:17.000000000 -0800
> @@ -1182,6 +1182,9 @@ usbnet_probe (struct usb_interface *udev
> // NOTE net->name still not usable ...
> if (info->bind) {
> status = info->bind (dev, udev);
> + if (status < 0)
> + goto out1;
> +
> // heuristic: "usb%d" for links we know are two-host,
> // else "eth%d" when there's reasonable doubt. userspace
> // can rename the link if it knows better.
> @@ -1208,12 +1211,12 @@ usbnet_probe (struct usb_interface *udev
> if (status == 0 && dev->status)
> status = init_status (dev, udev);
> if (status < 0)
> - goto out1;
> + goto out3;
>
> if (!dev->rx_urb_size)
> dev->rx_urb_size = dev->hard_mtu;
> dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
> -
> +
> SET_NETDEV_DEV(net, &udev->dev);
> status = register_netdev (net);
> if (status)
>
Good point.
Acked-by: Dan Carpenter <[EMAIL PROTECTED]>
regards,
dan carpenter
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel