Skip to content

Commit 3923468

Browse files
Daniel Thompsonlag-linaro
authored andcommitted
backlight: lp8788: Fully initialize backlight_properties during probe
props is stack allocated and the fields that are not explcitly set by the probe function need to be zeroed or we'll get undefined behaviour (especially so power/blank states)! Fixes: c5a5105 ("backlight: add new lp8788 backlight driver") Signed-off-by: Daniel Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent abb5a5d commit 3923468

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/video/backlight/lp8788_bl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static int lp8788_backlight_register(struct lp8788_bl *bl)
191191
int init_brt;
192192
char *name;
193193

194+
memset(&props, 0, sizeof(struct backlight_properties));
194195
props.type = BACKLIGHT_PLATFORM;
195196
props.max_brightness = MAX_BRIGHTNESS;
196197

0 commit comments

Comments
 (0)