From: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: sx8654 - fix memory allocation check
Date: Mon, 11 May 2015 11:51:22 +0200 [thread overview]
Message-ID: <55507B9A.4060700@armadeus.com> (raw)
In-Reply-To: <20150508235031.GA29274@dtor-ws>
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
prev parent reply other threads:[~2015-05-11 9:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 23:50 [PATCH] Input: sx8654 - fix memory allocation check Dmitry Torokhov
2015-05-11 9:51 ` Sébastien Szymanski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55507B9A.4060700@armadeus.com \
--to=sebastien.szymanski@armadeus.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).