diff mbox

[stable,3/6] usb: dwc2/gadget: break infinite loop in endpoint disable code

Message ID 1410252496-13814-4-git-send-email-r.baldyga@samsung.com
State Accepted
Commit e0cbe595db72b037260bbda77106f6811a1ebb1d
Headers show

Commit Message

Robert Baldyga Sept. 9, 2014, 8:48 a.m. UTC
From: Marek Szyprowski <m.szyprowski@samsung.com>

This patch fixes possible freeze caused by infinite loop in interrupt
context.

Cc: <stable@vger.kernel.org> # 3.16.x
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 70eab95..f3198dc 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1650,6 +1650,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);