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>
This commit is contained in:
parent
de77000c19
commit
c80b7c8f9d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user