Skip to content

Commit

Permalink
Cleanup usbnet_probe() return value handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Korsgaard authored and Jeff Garzik committed Jul 10, 2007
1 parent 4638aef commit 9514bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9514bfe

Please sign in to comment.