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:
parent
57e413d95b
commit
5bc923c505
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue