Commit 8cc113a1 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: error check for claiming second interface in usbnet

  - fail if second interface is already claimed
parent a89192f6
......@@ -600,7 +600,9 @@ static int cdc_bind (struct usbnet *dev, struct usb_interface *intf)
/* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment