USB: usbnet driver bugfix
The attached fixes an oops in the usbnet driver. The same patch is in 2.6.21-rc1, but that one has many whitespace changes. This is much smaller. Signed-off-by: David Brownell <david-b@pacbell.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
committed by
Adrian Bunk
parent
c6eeec0fc7
commit
2f9ccf56f3
@@ -1101,6 +1101,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
|
||||
// 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.
|
||||
@@ -1127,12 +1130,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user