aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-05 00:31:33 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-05 00:32:21 -0800
commit5bc923c505926af927d4f3011da92c243787d6a7 (patch)
tree936e8dffa663746c0411ee842a6d0ab5cb8f9591 /drivers/input
parent57e413d95b0f92b9a5569408ddc3441e0f20e856 (diff)
Input: gamecon - fix off by one range check
It should be >= GC_MAX not > GC_MAX. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/gamecon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index ae998d99a5a..7a55714a148 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -819,7 +819,7 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type)
int i;
int err;
- if (pad_type < 1 || pad_type > GC_MAX) {
+ if (pad_type < 1 || pad_type >= GC_MAX) {
pr_err("Pad type %d unknown\n", pad_type);
return -EINVAL;
}