usb: s3c-hsotg: break infinite loop in endpoint disable code
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 29 May 2014 11:29:31 +0000 (13:29 +0200)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 06:17:40 +0000 (15:17 +0900)
This patch fixes possible freeze caused by infinite loop in interrupt
context.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie70ffda63d3608e5e73d87b41d0966d225cc2879

drivers/usb/gadget/s3c-hsotg.c

index 3c4d802..2cd3fc3 100644 (file)
@@ -383,6 +383,7 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
                        dev_err(hsotg->dev,
                                "%s: timeout flushing fifos (GRSTCTL=%08x)\n",
                                __func__, val);
+                       break;
                }
 
                udelay(1);
@@ -1791,6 +1792,7 @@ static void s3c_hsotg_txfifo_flush(struct s3c_hsotg *hsotg, unsigned int idx)
                        dev_err(hsotg->dev,
                                "%s: timeout flushing fifo (GRSTCTL=%08x)\n",
                                __func__, val);
+                       break;
                }
 
                udelay(1);