usb: dwc3: gadget: reinitialize retries
retries is used twice without being reinitialized. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
2c61a8efce
commit
aed430e513
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue