s3c: fix check of index into s3c_gpios[]
Subsystems (2)
PATCH 1/3 s3c: fix check of index into s3c_gpios[]
From: Roel Kluin <[email protected]>
The check of the s3c_gpios[] index had an off-by-one.
Signed-off-by Roel Kluin <[email protected]>
Acked-by Ben Dooks <[email protected]>
Cc Russell King <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/arm/plat-s3c/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-s3c/gpio.c renamed from arch/arm/plat-s3c/gpio.c~s3c-fix-check-of-index-into-s3c_gpios +1 -1
@@ -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; } }
_