* [PATCH] Input: sx8654 - fix memory allocation check
@ 2015-05-08 23:50 Dmitry Torokhov
2015-05-11 9:51 ` Sébastien Szymanski
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2015-05-08 23:50 UTC (permalink / raw)
To: linux-input; +Cc: Sébastien Szymanski, linux-kernel
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@gmail.com>
---
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";
--
2.2.0.rc0.207.ga3a616c
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: sx8654 - fix memory allocation check
2015-05-08 23:50 [PATCH] Input: sx8654 - fix memory allocation check Dmitry Torokhov
@ 2015-05-11 9:51 ` Sébastien Szymanski
0 siblings, 0 replies; 2+ messages in thread
From: Sébastien Szymanski @ 2015-05-11 9:51 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input; +Cc: linux-kernel
Hello,
Acked-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
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@gmail.com>
> ---
> 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@armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-11 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 23:50 [PATCH] Input: sx8654 - fix memory allocation check Dmitry Torokhov
2015-05-11 9:51 ` Sébastien Szymanski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).