diff options
Diffstat (limited to 'drivers/input/keyboard/adp5589-keys.c')
-rw-r--r-- | drivers/input/keyboard/adp5589-keys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 67d12b3427c9..60dafd4fa692 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c | |||
@@ -992,7 +992,8 @@ static int adp5589_probe(struct i2c_client *client, | |||
992 | __set_bit(EV_REP, input->evbit); | 992 | __set_bit(EV_REP, input->evbit); |
993 | 993 | ||
994 | for (i = 0; i < input->keycodemax; i++) | 994 | for (i = 0; i < input->keycodemax; i++) |
995 | __set_bit(kpad->keycode[i] & KEY_MAX, input->keybit); | 995 | if (kpad->keycode[i] <= KEY_MAX) |
996 | __set_bit(kpad->keycode[i], input->keybit); | ||
996 | __clear_bit(KEY_RESERVED, input->keybit); | 997 | __clear_bit(KEY_RESERVED, input->keybit); |
997 | 998 | ||
998 | if (kpad->gpimapsize) | 999 | if (kpad->gpimapsize) |