diff options
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index ae6b5753fe67..a47cc1e97fae 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -789,9 +789,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, | |||
789 | 789 | ||
790 | dwc->ep0_next_event = DWC3_EP0_NRDY_STATUS; | 790 | dwc->ep0_next_event = DWC3_EP0_NRDY_STATUS; |
791 | 791 | ||
792 | r = next_request(&ep0->request_list); | ||
793 | ur = &r->request; | ||
794 | |||
795 | trb = dwc->ep0_trb; | 792 | trb = dwc->ep0_trb; |
796 | 793 | ||
797 | status = DWC3_TRB_SIZE_TRBSTS(trb->size); | 794 | status = DWC3_TRB_SIZE_TRBSTS(trb->size); |
@@ -804,6 +801,12 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, | |||
804 | return; | 801 | return; |
805 | } | 802 | } |
806 | 803 | ||
804 | r = next_request(&ep0->request_list); | ||
805 | if (!r) | ||
806 | return; | ||
807 | |||
808 | ur = &r->request; | ||
809 | |||
807 | length = trb->size & DWC3_TRB_SIZE_MASK; | 810 | length = trb->size & DWC3_TRB_SIZE_MASK; |
808 | 811 | ||
809 | if (dwc->ep0_bounced) { | 812 | if (dwc->ep0_bounced) { |