diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-18 15:44:17 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-19 07:14:06 -0400 |
commit | 7da18afa423f167e7ef3c9728e584d8bf05bd55a (patch) | |
tree | e7bba9211d04eadad4caa06af4b789e5631c2dd8 /arch/arm/plat-s3c/gpio.c | |
parent | 3318c4bddba34be4881cfcf8cf3d56e41678b716 (diff) |
ARM: s3c: fix check of index into s3c_gpios[]
The check of the s3c_gpios[] index had an off-by-one.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-s3c/gpio.c')
-rw-r--r-- | arch/arm/plat-s3c/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-s3c/gpio.c b/arch/arm/plat-s3c/gpio.c index 260fdc6ad685..5ff24e0f9f89 100644 --- a/arch/arm/plat-s3c/gpio.c +++ b/arch/arm/plat-s3c/gpio.c | |||
@@ -28,7 +28,7 @@ static __init void s3c_gpiolib_track(struct s3c_gpio_chip *chip) | |||
28 | 28 | ||
29 | gpn = chip->chip.base; | 29 | gpn = chip->chip.base; |
30 | for (i = 0; i < chip->chip.ngpio; i++, gpn++) { | 30 | for (i = 0; i < chip->chip.ngpio; i++, gpn++) { |
31 | BUG_ON(gpn > ARRAY_SIZE(s3c_gpios)); | 31 | BUG_ON(gpn >= ARRAY_SIZE(s3c_gpios)); |
32 | s3c_gpios[gpn] = chip; | 32 | s3c_gpios[gpn] = chip; |
33 | } | 33 | } |
34 | } | 34 | } |