UPSTREAM: usb: dwc3: gadget: ep_queue simplify isoc start condition
To improve reading the code this patch moves the cases to start_isoc or return the function under one common condition check. Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Link: https://lore.kernel.org/r/20220306211251.2281335-2-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 26d27a1080a7d0e8f0c1a56dc50aae336f9525d1) Bug: 263189538 Change-Id: I60ada6edcc6f1a505f2a3d86fc4a6d8b7d22f089 Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
This commit is contained in:
committed by
Treehugger Robot
parent
8dd53dc29a
commit
fd0d0cdd6d
@@ -1899,13 +1899,11 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
|
||||
* errors which will force us issue EndTransfer command.
|
||||
*/
|
||||
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
||||
if (!(dep->flags & DWC3_EP_PENDING_REQUEST) &&
|
||||
!(dep->flags & DWC3_EP_TRANSFER_STARTED))
|
||||
return 0;
|
||||
|
||||
if ((dep->flags & DWC3_EP_PENDING_REQUEST)) {
|
||||
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED))
|
||||
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED)) {
|
||||
if ((dep->flags & DWC3_EP_PENDING_REQUEST))
|
||||
return __dwc3_gadget_start_isoc(dep);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user