Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5448
b: refs/heads/master
c: 5ac7ba3
h: refs/heads/master
v: v3
  • Loading branch information
Vojtech Pavlik authored and Dmitry Torokhov committed Jul 24, 2005
1 parent d776683 commit a60d0e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 463a4f76a79bce00ca8964e0b2ebf7f10f376965
refs/heads/master: 5ac7ba3ff599d66ffde182676f2e4fbcac61a2fe
4 changes: 2 additions & 2 deletions trunk/drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL;
if (get_user(v, ip + 1)) return -EFAULT;
if (v < 0 || v > KEY_MAX) return -EINVAL;
if (v >> (dev->keycodesize * 8)) return -EINVAL;
u = SET_INPUT_KEYCODE(dev, t, v);
clear_bit(u, dev->keybit);
set_bit(v, dev->keybit);
Expand Down

0 comments on commit a60d0e8

Please sign in to comment.