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>
This commit is contained in:
Dan Carpenter 2010-03-05 00:31:33 -08:00 committed by Dmitry Torokhov
parent 57e413d95b
commit 5bc923c505
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}