summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/f_ecm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c
index fcafe1af4585..5d3561ea1c15 100644
--- a/drivers/usb/gadget/f_ecm.c
+++ b/drivers/usb/gadget/f_ecm.c
@@ -1012,6 +1012,7 @@ struct usb_function *ecm_alloc(struct usb_function_instance *fi)
sizeof(ecm->ethaddr));
if (status < 12) {
kfree(ecm);
+ mutex_unlock(&opts->lock);
return ERR_PTR(-EINVAL);
}
ecm_string_defs[1].s = ecm->ethaddr;