diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-05 09:31:33 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-05 09:32:21 +0100 |
commit | 5bc923c505926af927d4f3011da92c243787d6a7 (patch) | |
tree | 936e8dffa663746c0411ee842a6d0ab5cb8f9591 /drivers/input/joystick | |
parent | Input: wacom - replace WACOM_PKGLEN_PENABLED (diff) | |
download | linux-5bc923c505926af927d4f3011da92c243787d6a7.tar.xz linux-5bc923c505926af927d4f3011da92c243787d6a7.zip |
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/joystick')
-rw-r--r-- | drivers/input/joystick/gamecon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index ae998d99a5ae..7a55714a1486 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; } |