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:
		
							parent
							
								
									6e91f527cd
								
							
						
					
					
						commit
						cb1cebbee6
					
				| @ -1181,6 +1181,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||||||
| 	// NOTE net->name still not usable ...
 | 	// NOTE net->name still not usable ...
 | ||||||
| 	if (info->bind) { | 	if (info->bind) { | ||||||
| 		status = info->bind (dev, udev); | 		status = info->bind (dev, udev); | ||||||
|  | 		if (status < 0) | ||||||
|  | 			goto out1; | ||||||
|  | 
 | ||||||
| 		// heuristic:  "usb%d" for links we know are two-host,
 | 		// heuristic:  "usb%d" for links we know are two-host,
 | ||||||
| 		// else "eth%d" when there's reasonable doubt.  userspace
 | 		// else "eth%d" when there's reasonable doubt.  userspace
 | ||||||
| 		// can rename the link if it knows better.
 | 		// 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) | 	if (status == 0 && dev->status) | ||||||
| 		status = init_status (dev, udev); | 		status = init_status (dev, udev); | ||||||
| 	if (status < 0) | 	if (status < 0) | ||||||
| 		goto out1; | 		goto out3; | ||||||
| 
 | 
 | ||||||
| 	if (!dev->rx_urb_size) | 	if (!dev->rx_urb_size) | ||||||
| 		dev->rx_urb_size = dev->hard_mtu; | 		dev->rx_urb_size = dev->hard_mtu; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user