From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: Eugen Hristev <eugen.hristev@microchip.com>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] Input: resistive-adc-touch: Fix uninitialized variable 'press'
Date: Sat, 5 Jun 2021 16:19:59 -0700 [thread overview]
Message-ID: <YLwGnzqb2JvKKNnm@google.com> (raw)
In-Reply-To: <20210603220809.155118-1-colin.king@canonical.com>
Hi Colin,
On Thu, Jun 03, 2021 at 11:08:09PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where st->ch_map[GRTS_CH_PRESSURE] < GRTS_MAX_CHANNELS is false
> and also st->ch_map[GRTS_CH_Z1] < GRTS_MAX_CHANNELS is false the variable
> press is not initialized and contains garbage. This affects a later
> comparison of press < st->pressure_min.
If neither of the conditions is true, then st->pressure is also false,
and we will not be evaluating condition involving "press". However it is
impossible for the compiler/Coverity to figure this out, so I'll apply
the patch adjusting the description a bit.
Thanks.
--
Dmitry
prev parent reply other threads:[~2021-06-05 23:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 22:08 [PATCH][next] Input: resistive-adc-touch: Fix uninitialized variable 'press' Colin King
2021-06-05 23:19 ` Dmitry Torokhov [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=YLwGnzqb2JvKKNnm@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=colin.king@canonical.com \
--cc=eugen.hristev@microchip.com \
--cc=kernel-janitors@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.