usbnet: init fault (oops) cleanup, whitespace fixes
This cleans up some error handling paths in usbnet device probing; one of them could cause oopsing, e.g. with some RNDIS devices. It also removes some extraneous whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
6e91f527cd
Коммит
cb1cebbee6
|
@ -1181,6 +1181,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.
|
||||
|
@ -1207,7 +1210,7 @@ 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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче