OSDN Git Service

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 6d76e28..e3bb525 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);