diff options
| author | Luca Weiss <[email protected]> | 2024-02-20 00:11:19 +0100 |
|---|---|---|
| committer | Lee Jones <[email protected]> | 2024-03-07 09:03:29 +0000 |
| commit | ad9aeb0e3aa90ebdad5fabf9c21783740eb95907 (patch) | |
| tree | 2903003acc60f4ca772ed431d30e99b60bb0d3ae | |
| parent | 7ee6478d5aa957d796a18e8c0e63943b038acf58 (diff) | |
backlight: lm3630a: Initialize backlight_properties on init
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 <[email protected]>
Reviewed-by: Daniel Thompson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>
| -rw-r--r-- | drivers/video/backlight/lm3630a_bl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index a3412c936ca2..8e275275b808 100644 --- 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; |