aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorIan Campbell <icampbell@arcom.com>2005-06-01 03:39:25 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-01 03:39:25 -0400
commitb6cbf3ef4f270c0dfe84b26649e4fc0c25bb0844 (patch)
tree53c2c011e04d95e03aba6aed21702ae5ef2ffc45 /drivers/input/misc
parentc30b4c10d9cfe5506fd421304935d8836773c7e5 (diff)
Input: return correct value when setting up absolute device via uinipt.
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 <icampbell@arcom.com> Acked-by: Aristeu Rozanski <aris@cathedrallabs.org> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/uinput.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 158c8e845ff9..98710997aaaa 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -298,9 +298,11 @@ static int uinput_alloc_device(struct file *file, const char __user *buffer, siz
298 /* check if absmin/absmax/absfuzz/absflat are filled as 298 /* check if absmin/absmax/absfuzz/absflat are filled as
299 * told in Documentation/input/input-programming.txt */ 299 * told in Documentation/input/input-programming.txt */
300 if (test_bit(EV_ABS, dev->evbit)) { 300 if (test_bit(EV_ABS, dev->evbit)) {
301 retval = uinput_validate_absbits(dev); 301 int err = uinput_validate_absbits(dev);
302 if (retval < 0) 302 if (err < 0) {
303 retval = err;
303 kfree(dev->name); 304 kfree(dev->name);
305 }
304 } 306 }
305 307
306exit: 308exit: