提交 5bc923c5 编写于 作者: D Dan Carpenter 提交者: Dmitry Torokhov

Input: gamecon - fix off by one range check

It should be >= GC_MAX not > GC_MAX.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 57e413d9
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册