Skip to content

Commit ad9aeb0

Browse files
z3ntulag-linaro
authored andcommitted
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: 0c2a665 ("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]>
1 parent 7ee6478 commit ad9aeb0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/video/backlight/lm3630a_bl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ static int lm3630a_backlight_register(struct lm3630a_chip *pchip)
343343
struct backlight_properties props;
344344
const char *label;
345345

346+
memset(&props, 0, sizeof(struct backlight_properties));
346347
props.type = BACKLIGHT_RAW;
347348
if (pdata->leda_ctrl != LM3630A_LEDA_DISABLE) {
348349
props.brightness = pdata->leda_init_brt;

0 commit comments

Comments
 (0)