diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-26 12:16:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-26 12:16:46 +0300 |
commit | d842bc6c0579ca7643eed029beabab3ac562a335 (patch) | |
tree | 6e1f1521efe88b095b14a759ea15aa81e7b0e33f /drivers/usb/dwc3/ep0.c | |
parent | 8e6cb5d27e8246d9c986ec162d066a502d2b602b (diff) | |
parent | ff1176468d368232b684f75e82563369208bc371 (diff) | |
download | linux-d842bc6c0579ca7643eed029beabab3ac562a335.tar.xz |
Merge v5.14-rc3 into usb-next
We need the fixes in here, and this resolves a merge issue with
drivers/usb/dwc3/gadget.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index d28d08532455..658739410992 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -597,11 +597,13 @@ static int dwc3_ep0_set_address(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) static int dwc3_ep0_delegate_req(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) { - int ret; + int ret = -EINVAL; - spin_unlock(&dwc->lock); - ret = dwc->gadget_driver->setup(dwc->gadget, ctrl); - spin_lock(&dwc->lock); + if (dwc->async_callbacks) { + spin_unlock(&dwc->lock); + ret = dwc->gadget_driver->setup(dwc->gadget, ctrl); + spin_lock(&dwc->lock); + } return ret; } |