Skip to content

Commit

Permalink
usb: dwc3: ep0: prevent starting transfers twice on ep0
Browse files Browse the repository at this point in the history
In case we try to start an invalid test mode, we
will call dwc3_ep0_stall_and_restart() but we will
also call dwc3_ep0_out_start() which will start
a second transfer on ep0.

Let's prevent any problems by returning early in
the error case.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Jun 25, 2012
1 parent 9be2395 commit 5c81aba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ static void dwc3_ep0_complete_status(struct dwc3 *dwc,
dev_dbg(dwc->dev, "Invalid Test #%d\n",
dwc->test_mode_nr);
dwc3_ep0_stall_and_restart(dwc);
return;
}
}

Expand Down

0 comments on commit 5c81aba

Please sign in to comment.