usb: dwc2: gadget: don't block after fifo flush timeout
authorGregory Herrero <gregory.herrero@intel.com>
Fri, 9 Jan 2015 12:39:01 +0000 (13:39 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 21:34:18 +0000 (15:34 -0600)
Can't stay in the loop forever. Break it after timeout.

Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c

index 6d76e28a69da1d57302a02e753e4c23df2e8dc92..e3bb525ae54da3ee655136f790bd830d7f0d7b50 100644 (file)
@@ -230,6 +230,7 @@ static void s3c_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
                        dev_err(hsotg->dev,
                                "%s: timeout flushing fifos (GRSTCTL=%08x)\n",
                                __func__, val);
+                       break;
                }
 
                udelay(1);