diff options
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 14 |
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 | ||
450 | static int __exit eth_unbind(struct usb_composite_dev *cdev) | 450 | static 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 | ||