Re: [PATCH] backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms

From: Robert Jarzmik
Date: Fri Dec 11 2015 - 12:33:35 EST


Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> writes:

> 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: Robert Jarzmik <robert.jarzmik@xxxxxxx>
> Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
And indeed it does the trick.

Tested-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/