usb: dwc3: gadget: reinitialize retries
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Fri, 27 Apr 2012 09:52:01 +0000 (12:52 +0300)
committerFelipe Balbi <balbi@ti.com>
Sun, 3 Jun 2012 20:08:22 +0000 (23:08 +0300)
retries is used twice without being reinitialized.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 045799356a29f057bd1387a29f8cca0f4d7093dc..c21516aef5e45991e671d0a2e2682786a1a027a4 100644 (file)
@@ -108,6 +108,7 @@ int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state)
        dwc3_writel(dwc->regs, DWC3_DCTL, reg);
 
        /* wait for a change in DSTS */
+       retries = 10000;
        while (--retries) {
                reg = dwc3_readl(dwc->regs, DWC3_DSTS);