linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Chris Morgan <macroalpha82@gmail.com>
Cc: linux-input@vger.kernel.org,
	Chris Morgan <macromorgan@hotmail.com>,
	Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] hynitron_cstxxx: Initialize tmp to 0 to fix uninitialized variable issue
Date: Thu, 17 Nov 2022 22:11:54 -0800	[thread overview]
Message-ID: <Y3ciKoAJWdFoCXIX@google.com> (raw)
In-Reply-To: <20221117195921.2291-1-macroalpha82@gmail.com>

On Thu, Nov 17, 2022 at 01:59:21PM -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> In the very unlikely event the cst3xx_i2c_write() fails inside of the
> cst3xx_bootloader_enter() function 5 times in a row, the uninitalized
> value of tmp will get compared to CST3XX_BOOTLDR_CHK_VAL. Initialize
> the value of tmp to 0 so that in this unlikely event we are comparing
> 0 instead of an uninitalized variable.
> 
> Fixes: 66603243f528 ("Input: add driver for Hynitron cstxxx touchscreens")
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> Reported-by: Dan Carpenter <error27@gmail.com>

Applied, thank you.

-- 
Dmitry

      reply	other threads:[~2022-11-18  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 19:59 [PATCH] hynitron_cstxxx: Initialize tmp to 0 to fix uninitialized variable issue Chris Morgan
2022-11-18  6:11 ` 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=Y3ciKoAJWdFoCXIX@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=error27@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    /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).