aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 60b696e9336b..3738d173f9a6 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -322,7 +322,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
322 if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL; 322 if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL;
323 if (get_user(v, ip + 1)) return -EFAULT; 323 if (get_user(v, ip + 1)) return -EFAULT;
324 if (v < 0 || v > KEY_MAX) return -EINVAL; 324 if (v < 0 || v > KEY_MAX) return -EINVAL;
325 if (v >> (dev->keycodesize * 8)) return -EINVAL; 325 if (dev->keycodesize < sizeof(v) && (v >> (dev->keycodesize * 8))) return -EINVAL;
326 u = SET_INPUT_KEYCODE(dev, t, v); 326 u = SET_INPUT_KEYCODE(dev, t, v);
327 clear_bit(u, dev->keybit); 327 clear_bit(u, dev->keybit);
328 set_bit(v, dev->keybit); 328 set_bit(v, dev->keybit);