Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abe7a409 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi
Browse files

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: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 9890e330
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}