Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb1cebbe authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6e91f527
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -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;