mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "usb: dwc3: gadget: Remove unnecessary checks"
This commit is contained in:
commit
a91e5519be
1 changed files with 5 additions and 8 deletions
|
|
@ -1703,9 +1703,6 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
/* wait until it is processed */
|
||||
dwc3_stop_active_transfer(dep, true, true);
|
||||
|
||||
if (!r->trb)
|
||||
goto out0;
|
||||
|
||||
/*
|
||||
* Remove any started request if the transfer is
|
||||
* cancelled.
|
||||
|
|
@ -1713,10 +1710,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
list_for_each_entry_safe(r, t, &dep->started_list, list)
|
||||
dwc3_gadget_move_cancelled_request(r);
|
||||
|
||||
if (dep->flags & DWC3_EP_TRANSFER_STARTED)
|
||||
goto out0;
|
||||
else
|
||||
goto out1;
|
||||
goto out0;
|
||||
}
|
||||
dev_err(dwc->dev, "request %pK was not queued to %s\n",
|
||||
request, ep->name);
|
||||
|
|
@ -1724,7 +1718,6 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
goto out0;
|
||||
}
|
||||
|
||||
out1:
|
||||
dbg_ep_dequeue(dep->number, req);
|
||||
dwc3_gadget_giveback(dep, req, -ECONNRESET);
|
||||
|
||||
|
|
@ -2932,9 +2925,13 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
|
|||
|
||||
dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
|
||||
|
||||
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING)
|
||||
goto out;
|
||||
|
||||
if (stop)
|
||||
dwc3_stop_active_transfer(dep, true, true);
|
||||
|
||||
out:
|
||||
/*
|
||||
* WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround.
|
||||
* See dwc3_gadget_linksts_change_interrupt() for 1st half.
|
||||
|
|
|
|||
Loading…
Reference in a new issue