Skip to content
Commit e12d3e16 authored by Henry Martin's avatar Henry Martin Committed by Lee Jones
Browse files

backlight: pm8941: Add NULL check in wled_configure()



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: f86b7758 ("backlight: pm8941: Convert to using %pOFn instead of device_node.name")
Signed-off-by: default avatarHenry Martin <bsdhenrymartin@gmail.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: default avatar"Daniel Thompson (RISCstar)" <danielt@kernel.org>
Link: https://lore.kernel.org/r/20250401091647.22784-1-bsdhenrymartin@gmail.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent d32a0b56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment