From 1096cc08c03af37517a29b4e453002911a9ad82e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Tue, 13 Dec 2011 22:13:15 +0000 Subject: [PATCH] usb-s3c6400: fix endpoint array traversal in interrupt handler fix r31219 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31233 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/usb-s3c6400x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c index 66699bac89..16cabb6ccf 100644 --- a/firmware/target/arm/usb-s3c6400x.c +++ b/firmware/target/arm/usb-s3c6400x.c @@ -166,8 +166,9 @@ static void usb_reset(void) static void handle_ep_int(int out) { static const uint8_t eps[2][3] = { /* IN */ {0, 1, 3}, /* OUT */ {0, 2, 4}}; - for (int i = 0, ep = eps[!!out][i]; i < 3; ep = eps[!!out][i]) + for (int i = 0; i < 3; i++) { + int ep = eps[!!out][i]; uint32_t epints = DEPINT(ep, out); if (!epints) continue; -- 2.11.4.GIT