All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: iqs5xx - initialize an uninitialized variable
@ 2021-01-25 16:35 Jeff LaBundy
  2021-01-25 18:13 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff LaBundy @ 2021-01-25 16:35 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, Jeff LaBundy

If execution jumps to the err_kfree label, error_bl is evaluated
before it is initialized. Fix this by initializing it to zero.

Fixes: 2539da6677b6 ("Input: iqs5xx - preserve bootloader errors")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
---
 drivers/input/touchscreen/iqs5xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c
index 05e0c6f..54f3003 100644
--- a/drivers/input/touchscreen/iqs5xx.c
+++ b/drivers/input/touchscreen/iqs5xx.c
@@ -852,7 +852,7 @@ static int iqs5xx_fw_file_parse(struct i2c_client *client,
 static int iqs5xx_fw_file_write(struct i2c_client *client, const char *fw_file)
 {
 	struct iqs5xx_private *iqs5xx = i2c_get_clientdata(client);
-	int error, error_bl;
+	int error, error_bl = 0;
 	u8 *pmap;
 
 	if (iqs5xx->bl_status == IQS5XX_BL_STATUS_NONE)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: iqs5xx - initialize an uninitialized variable
  2021-01-25 16:35 [PATCH] Input: iqs5xx - initialize an uninitialized variable Jeff LaBundy
@ 2021-01-25 18:13 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2021-01-25 18:13 UTC (permalink / raw)
  To: Jeff LaBundy; +Cc: linux-input

On Mon, Jan 25, 2021 at 10:35:00AM -0600, Jeff LaBundy wrote:
> If execution jumps to the err_kfree label, error_bl is evaluated
> before it is initialized. Fix this by initializing it to zero.
> 
> Fixes: 2539da6677b6 ("Input: iqs5xx - preserve bootloader errors")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-25 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 16:35 [PATCH] Input: iqs5xx - initialize an uninitialized variable Jeff LaBundy
2021-01-25 18:13 ` Dmitry Torokhov

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.