diff options
author | Mattia Dongili <malattia@linux.it> | 2010-11-18 12:06:43 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-11-18 12:20:42 -0500 |
commit | de391d12500ede13faa7ecadbe900a8de1f76cfa (patch) | |
tree | 1eead92192ccd11aebe5b734767aebfeed5dd258 /drivers/input | |
parent | 6f07d31e46639e4b1b23de6ee88c9e079a7bf32d (diff) |
Input: fix typo in keycode validation supporting large scancodes
Check the input_keymap_entry keycode size (u32) instead of the device's
(void*) when validating that keycode value can be stored in the keymap.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722
Signed-off-by: Mattia Dongili <malattia@linux.it>
Tested-by: Norbert Preining <preining@logic.at>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 7f26ca6ecf75..5edc41aa08f8 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -753,7 +753,7 @@ static int input_default_setkeycode(struct input_dev *dev, | |||
753 | if (index >= dev->keycodemax) | 753 | if (index >= dev->keycodemax) |
754 | return -EINVAL; | 754 | return -EINVAL; |
755 | 755 | ||
756 | if (dev->keycodesize < sizeof(dev->keycode) && | 756 | if (dev->keycodesize < sizeof(ke->keycode) && |
757 | (ke->keycode >> (dev->keycodesize * 8))) | 757 | (ke->keycode >> (dev->keycodesize * 8))) |
758 | return -EINVAL; | 758 | return -EINVAL; |
759 | 759 | ||