Re: [PATCH v1] misc: tps6594-pfsm: Add NULL check in tps6594_pfsm_probe()
From: Greg KH
Date: Tue Apr 15 2025 - 10:13:57 EST
On Tue, Apr 01, 2025 at 09:34:04PM +0800, Henry Martin wrote:
> devm_kasprintf() returns NULL when memory allocation fails. Currently,
> tps6594_pfsm_probe() does not check for this case, which results in a
> NULL pointer dereference.
>
> Add NULL check after devm_kasprintf() to prevent this issue.
>
> Fixes: a0df3ef087f8 ("misc: tps6594-pfsm: Add driver for TI TPS6594 PFSM")
> Signed-off-by: Henry Martin <bsdhenrymartin@xxxxxxxxx>
> ---
> drivers/misc/tps6594-pfsm.c | 2 ++
> 1 file changed, 2 insertions(+)
Someone else sent this before you did, sorry:
https://lore.kernel.org/r/20250311010511.1028269-1-chenyuan0y@xxxxxxxxx