mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 16:40:22 +00:00
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>
This commit is contained in:
parent
9890e33013
commit
abe7a4097d
@ -368,8 +368,10 @@ static int zero_unbind(struct usb_composite_dev *cdev)
|
||||
del_timer_sync(&autoresume_timer);
|
||||
if (!IS_ERR_OR_NULL(func_ss))
|
||||
usb_put_function(func_ss);
|
||||
usb_put_function_instance(func_inst_ss);
|
||||
if (!IS_ERR_OR_NULL(func_lb))
|
||||
usb_put_function(func_lb);
|
||||
usb_put_function_instance(func_inst_lb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user