diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 09:48:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 09:48:34 -0700 |
commit | e0d7ff168a71299919f01500b3d507aae0c67513 (patch) | |
tree | de2a7807ec5642e7389191e66d8c5d6d1249096a /drivers/char/keyboard.c | |
parent | ca49a601c2b4b74e5cf57fef62122204d1982372 (diff) | |
parent | 33fdfa97f2b3aab698ef849ec50dcc5102017f0a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r-- | drivers/char/keyboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 7b19e02f112..523fd3c8bba 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -198,10 +198,10 @@ int setkeycode(unsigned int scancode, unsigned int keycode) if (scancode >= dev->keycodemax) return -EINVAL; - if (keycode > KEY_MAX) - return -EINVAL; if (keycode < 0 || keycode > KEY_MAX) return -EINVAL; + if (keycode >> (dev->keycodesize * 8)) + return -EINVAL; oldkey = SET_INPUT_KEYCODE(dev, scancode, keycode); |