usb: dwc3: gadget: add missing spin_lock()
authorFelipe Balbi <balbi@ti.com>
Thu, 29 Jan 2015 16:29:18 +0000 (10:29 -0600)
committerFelipe Balbi <balbi@ti.com>
Thu, 29 Jan 2015 16:29:18 +0000 (10:29 -0600)
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)
Cc: <stable@vger.kernel.org> # v3.19
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 7cce00e7102b243f500d7fda4392f35c77988ca0..eccd29b1684081bfb652b5b4c684b6454decd7d2 100644 (file)
@@ -2045,6 +2045,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);
        }
 }