From: Ian Campbell uinput_alloc_device() is supposed to return the number of bytes read, the value is returned to uinput_write() and from there to userspace. If EV_ABS is set then it returns the value from uinput_validate_absbits() instead, which is zero when everything is ok instead of the count. Signed-off-by: Ian Campbell Acked-by: Aristeu Rozanski Cc: Vojtech Pavlik Signed-off-by: Andrew Morton --- drivers/input/misc/uinput.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN drivers/input/misc/uinput.c~allow-ev_abs-to-work-in-uinputc drivers/input/misc/uinput.c --- 25/drivers/input/misc/uinput.c~allow-ev_abs-to-work-in-uinputc Wed May 25 14:47:52 2005 +++ 25-akpm/drivers/input/misc/uinput.c Wed May 25 14:47:52 2005 @@ -298,9 +298,11 @@ static int uinput_alloc_device(struct fi /* check if absmin/absmax/absfuzz/absflat are filled as * told in Documentation/input/input-programming.txt */ if (test_bit(EV_ABS, dev->evbit)) { - retval = uinput_validate_absbits(dev); - if (retval < 0) + int err = uinput_validate_absbits(dev); + if (err < 0) { + retval = err; kfree(dev->name); + } } exit: _