Re: [PATCH] Input: sx8654 - fix memory allocation check

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

 



Hello,

Acked-by: Sébastien Szymanski <sebastien.szymanski@xxxxxxxxxxxx>

On 05/09/2015 01:50 AM, Dmitry Torokhov wrote:
> We have been testing wrong variable when trying to make sure that input
> allocation succeeded.
> 
> Reported by Coverity (CID 1295918).
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---
>  drivers/input/touchscreen/sx8654.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c
> index aecb9ad..642f4a5 100644
> --- a/drivers/input/touchscreen/sx8654.c
> +++ b/drivers/input/touchscreen/sx8654.c
> @@ -187,7 +187,7 @@ static int sx8654_probe(struct i2c_client *client,
>  		return -ENOMEM;
>  
>  	input = devm_input_allocate_device(&client->dev);
> -	if (!sx8654)
> +	if (!input)
>  		return -ENOMEM;
>  
>  	input->name = "SX8654 I2C Touchscreen";
> 


-- 
Sébastien Szymanski
Software Engineer
Armadeus Systems - A new vision of the embedded world
sebastien.szymanski@xxxxxxxxxxxx
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
--
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