From: Werner Johansson Date: Thu, 27 Aug 2015 17:41:15 +0000 (-0700) Subject: backlight: lp855x: Make sure props struct is zeroed X-Git-Tag: KARO-TX6UL-2015-11-03~70^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f7898f3ca71744ef834048dc78ad4a21db4ac64;p=karo-tx-linux.git 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 --- 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;