diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2023-07-22 00:22:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-03 10:24:08 +0200 |
commit | c80b7c8f9d523bc223fe31c95451f8ad3cd68566 (patch) | |
tree | e25d7ae91c4d95ff20efd3527770975ff89a3e45 /drivers/usb | |
parent | de77000c1923d7942f9b4f08447c8feeae1c0f33 (diff) | |
download | linux-stable-c80b7c8f9d523bc223fe31c95451f8ad3cd68566.tar.gz linux-stable-c80b7c8f9d523bc223fe31c95451f8ad3cd68566.tar.bz2 linux-stable-c80b7c8f9d523bc223fe31c95451f8ad3cd68566.zip |
usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate
commit 6237390644fb92b81f5262877fe545d0d2c7b5d7 upstream.
Commit 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race")
introduced one extra mutex_unlock of connect_lock in the usb_gadget_active function.
Fixes: 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race")
Cc: stable <stable@kernel.org>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230721222256.1743645-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/core.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 99f40611f459..139f471894fb 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -851,7 +851,6 @@ int usb_gadget_activate(struct usb_gadget *gadget) */ if (gadget->connected) ret = usb_gadget_connect_locked(gadget); - mutex_unlock(&gadget->udc->connect_lock); unlock: mutex_unlock(&gadget->udc->connect_lock); |