Forráskód Böngészése

Cleanup usbnet_probe() return value handling

usbnet_probe() handles a positive return value from the driver bind()
function as success, but will later only setup the status handler if the
return value was zero, leading to confusion. Patch adjusts this to accept
positive values as success in both checks.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Peter Korsgaard 18 éve
szülő
commit
9514bfe5d9
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      drivers/net/usb/usbnet.c

+ 1 - 1
drivers/net/usb/usbnet.c

@@ -1213,7 +1213,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 			status = 0;
 
 	}
-	if (status == 0 && dev->status)
+	if (status >= 0 && dev->status)
 		status = init_status (dev, udev);
 	if (status < 0)
 		goto out3;