提交 abe7a409 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 9890e330
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册