projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ee6478
)
backlight: lm3630a: Initialize backlight_properties on init
author
Luca Weiss
<luca@z3ntu.xyz>
Mon, 19 Feb 2024 23:11:19 +0000
(
00:11
+0100)
committer
Lee Jones
<lee@kernel.org>
Thu, 7 Mar 2024 09:03:29 +0000
(09:03 +0000)
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@z3ntu.xyz>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link:
https://lore.kernel.org/r/20240220-lm3630a-fixups-v1-1-9ca62f7e4a33@z3ntu.xyz
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/lm3630a_bl.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/video/backlight/lm3630a_bl.c
b/drivers/video/backlight/lm3630a_bl.c
index a3412c936ca28cfb38544aa4a3c3eb7f1c0155ad..8e275275b808f84f83f4a56ccf49cf99e59320a3 100644
(file)
--- a/
drivers/video/backlight/lm3630a_bl.c
+++ b/
drivers/video/backlight/lm3630a_bl.c
@@
-343,6
+343,7
@@
static int lm3630a_backlight_register(struct lm3630a_chip *pchip)
struct backlight_properties props;
const char *label;
+ memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
if (pdata->leda_ctrl != LM3630A_LEDA_DISABLE) {
props.brightness = pdata->leda_init_brt;