瀏覽代碼

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>
Andrzej Pietrasiewicz 12 年之前
父節點
當前提交
abe7a4097d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/usb/gadget/zero.c

+ 2 - 0
drivers/usb/gadget/zero.c

@@ -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;
 }