backlight: pwm_bl: Fix uninitialized variable
Currently, if the DT does not define num-interpolated-steps then num_steps is undefined and the interpolation code will deploy randomly. Fix with a simple initialize to zero. Fixes: 573fe6d1 ("backlight: pwm_bl: Linear interpolation between brightness-levels") Reported-by:Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by:
Daniel Thompson <daniel.thompson@linaro.org> Tested-by:
Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by:
Douglas Anderson <dianders@chromium.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
Showing
Please register or sign in to comment