Re: [PATCH 7/7] Input: wacom - Fail on missing features

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

 



On Thursday 07 January 2010 10:30:09 am Bastian Blank wrote:
> The driver needs a correct setup feature list, fail if it is not
> correctly set.
> 
> Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
> ---
>  drivers/input/tablet/wacom_sys.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/input/tablet/wacom_sys.c
>  b/drivers/input/tablet/wacom_sys.c index 41a631b..c44b9f0 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -534,6 +534,9 @@ static int wacom_probe(struct usb_interface *intf,
>  const struct usb_device_id *i struct input_dev *input_dev;
>  	int error = -ENOMEM;
> 
> +	if (!features)
> +		return -EIO;
> +

-EINVAL is probably better.

>  	wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
>  	wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL);
>  	input_dev = input_allocate_device();
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux