diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 2bb7d18ef2d5..5c5e9124872f 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -713,12 +713,12 @@ __acquires(ci->lock) { int retval; + spin_unlock(&ci->lock); if (ci->gadget.speed != USB_SPEED_UNKNOWN) { if (ci->driver) ci->driver->disconnect(&ci->gadget); } - spin_unlock(&ci->lock); retval = _gadget_stop_activity(&ci->gadget); if (retval) goto done;