aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/bf54x-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/bf54x-keys.c')
-rw-r--r--drivers/input/keyboard/bf54x-keys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index fc88fb48d70d..09b91d093087 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -289,7 +289,8 @@ static int bfin_kpad_probe(struct platform_device *pdev)
289 __set_bit(EV_REP, input->evbit); 289 __set_bit(EV_REP, input->evbit);
290 290
291 for (i = 0; i < input->keycodemax; i++) 291 for (i = 0; i < input->keycodemax; i++)
292 __set_bit(bf54x_kpad->keycode[i] & KEY_MAX, input->keybit); 292 if (bf54x_kpad->keycode[i] <= KEY_MAX)
293 __set_bit(bf54x_kpad->keycode[i], input->keybit);
293 __clear_bit(KEY_RESERVED, input->keybit); 294 __clear_bit(KEY_RESERVED, input->keybit);
294 295
295 error = input_register_device(input); 296 error = input_register_device(input);