DORMANTno replies REVIEWED: 1 (1M)

1 review trailer.

[patch 1/3] s3c: fix check of index into s3c_gpios[]

From: akpm@linux-foundation.org (akpm at linux-foundation.org)
Date: 2009-09-18 19:44:17

From: Roel Kluin <redacted>

The check of the s3c_gpios[] index had an off-by-one.

Signed-off-by: Roel Kluin <redacted>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm/plat-s3c/gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/arm/plat-s3c/gpio.c~s3c-fix-check-of-index-into-s3c_gpios arch/arm/plat-s3c/gpio.c
--- a/arch/arm/plat-s3c/gpio.c~s3c-fix-check-of-index-into-s3c_gpios
+++ a/arch/arm/plat-s3c/gpio.c
@@ -28,7 +28,7 @@ static __init void s3c_gpiolib_track(str
 
 	gpn = chip->chip.base;
 	for (i = 0; i < chip->chip.ngpio; i++, gpn++) {
-		BUG_ON(gpn > ARRAY_SIZE(s3c_gpios));
+		BUG_ON(gpn >= ARRAY_SIZE(s3c_gpios));
 		s3c_gpios[gpn] = chip;
 	}
 }
_
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help