ChangeSet 1.1123.18.5, 2003/08/11 15:12:27-07:00, oliver@neukum.org [PATCH] USB: error check for claiming second interface in usbnet - fail if second interface is already claimed drivers/usb/net/usbnet.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Fri Aug 15 10:47:58 2003 +++ b/drivers/usb/net/usbnet.c Fri Aug 15 10:47:59 2003 @@ -600,7 +600,9 @@ /* claim data interface and set it up ... with side effects. * network traffic can't flow until an altsetting is enabled. */ - usb_driver_claim_interface (&usbnet_driver, info->data, dev); + status = usb_driver_claim_interface (&usbnet_driver, info->data, dev); + if (status < 0) + return status; status = get_endpoints (dev, info->data); if (status < 0) { usb_driver_release_interface (&usbnet_driver, info->data);