Re: [PATCH v1] clk: davinci: Add NULL check in davinci_lpsc_clk_register()
From: Stephen Boyd
Date: Thu Jun 19 2025 - 19:49:40 EST
Quoting Henry Martin (2025-04-01 06:13:41)
> devm_kasprintf() returns NULL when memory allocation fails. Currently,
> davinci_lpsc_clk_register() does not check for this case, which results
> in a NULL pointer dereference.
>
> Add NULL check after devm_kasprintf() to prevent this issue and ensuring
> no resources are left allocated.
>
> Fixes: c6ed4d734bc7 ("clk: davinci: New driver for davinci PSC clocks")
> Signed-off-by: Henry Martin <bsdhenrymartin@xxxxxxxxx>
> ---
Applied to clk-next