Thread (2 messages) 2 messages, 2 authors, 2022-11-18

Re: [PATCH] hynitron_cstxxx: Initialize tmp to 0 to fix uninitialized variable issue

flat view

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2022-11-18 06:12:04

On Thu, Nov 17, 2022 at 01:59:21PM -0600, Chris Morgan wrote:
From: Chris Morgan <redacted>

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 <redacted>
Reported-by: Dan Carpenter <redacted>
Applied, thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help