[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240324235012.1356413-122-sashal@kernel.org>
Date: Sun, 24 Mar 2024 19:49:45 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Luca Weiss <luca@...tu.xyz>,
Daniel Thompson <daniel.thompson@...aro.org>,
Lee Jones <lee@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 121/148] backlight: lm3630a: Initialize backlight_properties on init
From: Luca Weiss <luca@...tu.xyz>
[ Upstream commit ad9aeb0e3aa90ebdad5fabf9c21783740eb95907 ]
The backlight_properties struct should be initialized to zero before
using, otherwise there will be some random values in the struct.
Fixes: 0c2a665a648e ("backlight: add Backlight driver for lm3630 chip")
Signed-off-by: Luca Weiss <luca@...tu.xyz>
Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>
Link: https://lore.kernel.org/r/20240220-lm3630a-fixups-v1-1-9ca62f7e4a33@z3ntu.xyz
Signed-off-by: Lee Jones <lee@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/video/backlight/lm3630a_bl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
index f17e5a8860fa7..70f5ea5f210cc 100644
--- a/drivers/video/backlight/lm3630a_bl.c
+++ b/drivers/video/backlight/lm3630a_bl.c
@@ -332,6 +332,7 @@ static int lm3630a_backlight_register(struct lm3630a_chip *pchip)
struct backlight_properties props;
struct lm3630a_platform_data *pdata = pchip->pdata;
+ memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
if (pdata->leda_ctrl != LM3630A_LEDA_DISABLE) {
props.brightness = pdata->leda_init_brt;
--
2.43.0
Powered by blists - more mailing lists