summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-06-25 18:30:49 +0200
committerFelipe Balbi <balbi@ti.com>2012-06-25 18:30:49 +0200
commit5c81ababecd7ddae08ca944a65d8030cd393013c (patch)
tree032008bb9f9d7efe374e695df18b81ea801d1cc2 /drivers/usb/dwc3
parentusb: dwc3: gadget: remove duplicated code from __dwc3_gadget_ep_set_halt (diff)
downloadlinux-5c81ababecd7ddae08ca944a65d8030cd393013c.tar.xz
linux-5c81ababecd7ddae08ca944a65d8030cd393013c.zip
usb: dwc3: ep0: prevent starting transfers twice on ep0
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>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/ep0.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 9a8f26cef0a1..8244eb53082e 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -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;
}
}