From: Peter Korsgaard Date: Mon, 2 Jul 2007 22:46:42 +0000 (+0200) Subject: Cleanup usbnet_probe() return value handling X-Git-Tag: v2.6.23-rc1~1151^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9514bfe5d92000a9fd6f3c44aa775819b5d78aaf;p=linux-2.6 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 86b6908433..37bf4f2c0a 100644 --- a/drivers/net/usb/usbnet.c +++ b/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;