Re: [UINPUT] Allow EV_ABS to work in uinput.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 <[email protected]>
Acked-by: Aristeu Rozanski <[email protected]>

> --- 2.6.orig/drivers/input/misc/uinput.c	2005-05-25 10:45:56.000000000 +0100
> +++ 2.6/drivers/input/misc/uinput.c	2005-05-25 10:47:02.000000000 +0100
> @@ -216,9 +216,11 @@
>  	/* 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:

-- 
Aristeu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux