diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-04-18 08:43:26 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-04-23 07:12:21 -0400 |
commit | abe7a4097dd0141d21d02e4bd949b377a0a75120 (patch) | |
tree | 3e3f446f518fcca9886428eb7097fc44310c1109 | |
parent | 9890e33013fae0d67cd385d2038fcab4e52a6632 (diff) |
usb: gadget: zero: put function instances on unbind
If function instances are not put on gadget's unbind, their implementation
module's refcount is nonzero and it is impossible to unload them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 685fa681cb65..2cd6262e8b71 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -368,8 +368,10 @@ static int zero_unbind(struct usb_composite_dev *cdev) | |||
368 | del_timer_sync(&autoresume_timer); | 368 | del_timer_sync(&autoresume_timer); |
369 | if (!IS_ERR_OR_NULL(func_ss)) | 369 | if (!IS_ERR_OR_NULL(func_ss)) |
370 | usb_put_function(func_ss); | 370 | usb_put_function(func_ss); |
371 | usb_put_function_instance(func_inst_ss); | ||
371 | if (!IS_ERR_OR_NULL(func_lb)) | 372 | if (!IS_ERR_OR_NULL(func_lb)) |
372 | usb_put_function(func_lb); | 373 | usb_put_function(func_lb); |
374 | usb_put_function_instance(func_inst_lb); | ||
373 | return 0; | 375 | return 0; |
374 | } | 376 | } |
375 | 377 | ||