From 9f7898f3ca71744ef834048dc78ad4a21db4ac64 Mon Sep 17 00:00:00 2001 From: Werner Johansson Date: Thu, 27 Aug 2015 10:41:15 -0700 Subject: [PATCH] backlight: lp855x: Make sure props struct is zeroed The driver occasionally got stuck in suspend mode or other strange states as those parts of the props struct were never initialized. Signed-off-by: Werner Johansson Signed-off-by: Bjorn Andersson Acked-by: Milo Kim Signed-off-by: Lee Jones --- drivers/video/backlight/lp855x_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index f88df9ec08d0..daca9e6a2bb3 100644 --- a/drivers/video/backlight/lp855x_bl.c +++ b/drivers/video/backlight/lp855x_bl.c @@ -283,6 +283,7 @@ static int lp855x_backlight_register(struct lp855x *lp) struct lp855x_platform_data *pdata = lp->pdata; const char *name = pdata->name ? : DEFAULT_BL_NAME; + memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_PLATFORM; props.max_brightness = MAX_BRIGHTNESS; -- 2.39.5