summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/function/f_hid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
index 7d18f413ffea..f0545f801c9d 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -875,6 +875,7 @@ static struct usb_function_instance *hidg_alloc_inst(void)
kfree(opts);
if (idr_is_empty(&hidg_ida.idr))
ghid_cleanup();
+ goto unlock;
}
config_group_init_type_name(&opts->func_inst.group, "", &hid_func_type);