aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ether.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 14:31:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 14:31:36 -0400
commit3132be9aefc6c7edd42156a35cc2a2134d154f5d (patch)
tree99dddada0e24e84d62855adf0a624c5ba4e35a01 /drivers/usb/gadget/ether.c
parenta93f66dc5ff51a8f88f13e4a4b8e3e51ed89c0a5 (diff)
parentfed1f1ed90bce42ea010e2904cbc04e7b8304940 (diff)
Merge tag 'usb-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are some tiny USB fixes for 3.11-rc4 Nothing major, some gadget fixes, some new device ids, a new tiny driver for the ANT+ USB device, and a number of fixes for the mos7840 driver that were much needed" * tag 'usb-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: ftdi_sio: add more RT Systems ftdi devices usb: chipidea: fix the build error with randconfig usb: chipidea: cast PORTSC_PTS and DEVLC_PTS macros usb: gadget: udc-core: fix the typo of udc state attribute usb: gadget: f_phonet: remove unused preprocessor conditional usb: gadget: multi: fix error return code in cdc_do_config() USB: mos7840: fix pointer casts USB: mos7840: fix race in led handling USB: mos7840: fix device-type detection USB: mos7840: fix race in register handling USB: serial: add driver for Suunto ANT+ USB device usb: gadget: free opts struct on error recovery usb: gadget: ether: put_usb_function on unbind usb: musb: fix resource passed from glue layer to musb
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index f48712ffe261..c1c113ef950c 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -449,14 +449,20 @@ fail:
449 449
450static int __exit eth_unbind(struct usb_composite_dev *cdev) 450static int __exit eth_unbind(struct usb_composite_dev *cdev)
451{ 451{
452 if (has_rndis()) 452 if (has_rndis()) {
453 usb_put_function(f_rndis);
453 usb_put_function_instance(fi_rndis); 454 usb_put_function_instance(fi_rndis);
454 if (use_eem) 455 }
456 if (use_eem) {
457 usb_put_function(f_eem);
455 usb_put_function_instance(fi_eem); 458 usb_put_function_instance(fi_eem);
456 else if (can_support_ecm(cdev->gadget)) 459 } else if (can_support_ecm(cdev->gadget)) {
460 usb_put_function(f_ecm);
457 usb_put_function_instance(fi_ecm); 461 usb_put_function_instance(fi_ecm);
458 else 462 } else {
463 usb_put_function(f_geth);
459 usb_put_function_instance(fi_geth); 464 usb_put_function_instance(fi_geth);
465 }
460 return 0; 466 return 0;
461} 467}
462 468