[PATCH v3] backlight: pm8941: Add NULL check in wled_configure()
Daniel Thompson
danielt at kernel.org
Tue Apr 1 08:44:51 UTC 2025
On Tue, Apr 01, 2025 at 10:57:37AM +0800, Henry Martin wrote:
> devm_kasprintf() returns NULL when memory allocation fails. Currently,
> wled_configure() does not check for this case, which results in a NULL
> pointer dereference.
>
> Add NULL check after devm_kasprintf() to prevent this issue.
>
> Fixes: f86b77583d88 ("backlight: pm8941: Convert to using %pOFn instead of device_node.name")
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>
> Signed-off-by: Henry Martin <bsdhenrymartin at gmail.com>
Reviewed-by: Daniel Thompson (RISCstar) <danielt at kernel.org>
Daniel.
More information about the dri-devel
mailing list