We do this for all other gadgets, but not for UMS. Fix this. Fixes: 57313f83e83e ("usbgadget: add support for USB mass storage gadget") Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/usb/gadget/multi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index cd5b529d3eba..102d8714f86d 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -169,6 +169,11 @@ static int multi_unbind(struct usb_composite_dev *cdev) usb_put_function_instance(fi_acm); } + if (gadget_multi_opts->ums_opts.files) { + usb_put_function(f_ums); + usb_put_function_instance(fi_ums); + } + if (gadget_multi_opts->dfu_opts.files) { usb_put_function(f_dfu); usb_put_function_instance(fi_dfu); -- 2.30.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox