aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-05 15:35:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-05 15:35:29 -0400
commit899631c7916b231ba6509c90dbc33221e9194029 (patch)
tree260cd353d6e6c7493d56fabe7dfc686d4a168d16 /drivers/input/misc
parent47e89798e7cd9390b74a173006afafcb12e8bc89 (diff)
parente28e1d93e9591d21e440f5210a9b4317c59445df (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: rpckbd - fix a leak of the IRQ during init failure Input: wacom - add support for Lenovo tablet ID (0xE6) Input: i8042 - downgrade selftest error message to dbg() Input: synaptics - fix crash in synaptics_module_init() Input: spear-keyboard - fix inverted condition in interrupt handler Input: uinput - allow for 0/0 min/max on absolute axes. Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes Input: sparse-keymap - report scancodes with key events Input: h3600_ts_input - fix a spelling error Input: wacom - report resolution for pen devices Input: wacom - constify wacom_features for a new missed Bamboo models
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/uinput.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 364bdf43a381..736056897e50 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev)
302 int retval = 0; 302 int retval = 0;
303 303
304 for (cnt = 0; cnt < ABS_CNT; cnt++) { 304 for (cnt = 0; cnt < ABS_CNT; cnt++) {
305 int min, max;
305 if (!test_bit(cnt, dev->absbit)) 306 if (!test_bit(cnt, dev->absbit))
306 continue; 307 continue;
307 308
308 if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) { 309 min = input_abs_get_min(dev, cnt);
310 max = input_abs_get_max(dev, cnt);
311
312 if ((min != 0 || max != 0) && max <= min) {
309 printk(KERN_DEBUG 313 printk(KERN_DEBUG
310 "%s: invalid abs[%02x] min:%d max:%d\n", 314 "%s: invalid abs[%02x] min:%d max:%d\n",
311 UINPUT_NAME, cnt, 315 UINPUT_NAME, cnt,