Commit 1a8ebef0 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usbnet, minor probe() fault fix

Some hardware had the poor taste to misbehave during probe(),
which turned up a minor bug.  This fixes it:  don't try to
free a network device that hasn't been registerd.
parent 69dc1c65
...@@ -3104,7 +3104,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) ...@@ -3104,7 +3104,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
} }
if (status < 0) if (status < 0)
goto out2; goto out1;
dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
...@@ -3127,7 +3127,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) ...@@ -3127,7 +3127,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
out3: out3:
if (info->unbind) if (info->unbind)
info->unbind (dev, udev); info->unbind (dev, udev);
out2:
free_netdev(net); free_netdev(net);
out1: out1:
kfree(dev); kfree(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment