Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 87770780 authored by Philipp Zabel's avatar Philipp Zabel Committed by Lee Jones
Browse files

backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms



Commit ee65ad0e2a9e ("backlight: pwm_bl: Avoid backlight flicker when
probed from DT") tries to dereference the device of_node pointer
unconditionally, causing a NULL pointer dereference on non-dt platforms.
Fix it by replacing the phandle variable with a node variable and
by checking that for NULL before dereferencing it.

Reported-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarThierry Reding <thierry.reding@gmail.com>
Tested-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent fcf13f0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment