diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index e9d099cee6361053fed1bcc1d0d046352afb9c95..007651c2163852f025334c7213daea863860eff9 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -551,7 +551,7 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) case USB_STATE_CONFIGURED: ret = dwc3_ep0_delegate_req(dwc, ctrl); - if (!cfg) + if (!cfg && !ret) usb_gadget_set_state(&dwc->gadget, USB_STATE_ADDRESS); break;