]> git.hungrycats.org Git - linux/commitdiff
usb: dwc3: gadget: add missing spin_lock()
authorFelipe Balbi <balbi@ti.com>
Thu, 29 Jan 2015 16:29:18 +0000 (10:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:57:34 +0000 (14:57 -0800)
commit 5c7b3b02de766a8634708953e805399e3544a290 upstream.

commit 8e74475b0e0a (usb: dwc3: gadget: use udc-core's
reset notifier) added support for the new UDC core's
reset notifier to dwc3 but while at it, it removed
a spin_lock() from dwc3_reset_gadget() which might
cause an unbalanced spin_unlock() further down the line

Fixes: 8e74475b0e0a (usb: dwc3: gadget: use udc-core's reset notifier)
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c

index 8f65ab3a3b928f3872dcc42b1ddfef38d4ba5d26..4efd3bd35586b76b94e8a2a17fedcfdd4a7ef3eb 100644 (file)
@@ -2043,6 +2043,7 @@ static void dwc3_resume_gadget(struct dwc3 *dwc)
        if (dwc->gadget_driver && dwc->gadget_driver->resume) {
                spin_unlock(&dwc->lock);
                dwc->gadget_driver->resume(&dwc->gadget);
+               spin_lock(&dwc->lock);
        }
 }