Skip to content

Commit 26d27a1

Browse files
mgrzeschikgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cee03ca commit 26d27a1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/usb/dwc3/gadget.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,13 +1919,11 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
19191919
* errors which will force us issue EndTransfer command.
19201920
*/
19211921
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
1922-
if (!(dep->flags & DWC3_EP_PENDING_REQUEST) &&
1923-
!(dep->flags & DWC3_EP_TRANSFER_STARTED))
1924-
return 0;
1925-
1926-
if ((dep->flags & DWC3_EP_PENDING_REQUEST)) {
1927-
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED))
1922+
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED)) {
1923+
if ((dep->flags & DWC3_EP_PENDING_REQUEST))
19281924
return __dwc3_gadget_start_isoc(dep);
1925+
1926+
return 0;
19291927
}
19301928
}
19311929

0 commit comments

Comments
 (0)