[PATCH] clk: aspeed: ast2700: Add missing NULL pointer check for devm_kasprintf()

Ryan Chen ryan_chen at aspeedtech.com
Sun Feb 22 16:34:13 PST 2026


> On Wed, Feb 18, 2026 at 04:16:37PM +0800, Felix Gu wrote:
> > devm_kasprintf() can return NULL on memory allocation failure.
> >
> > Check the return value and return -ENOMEM if allocation fails in
> > ast2700_soc_clk_probe().
> >
> > Fixes: fdc1eb624ddc ("clk: aspeed: add AST2700 clock driver")
> > Signed-off-by: Felix Gu <ustc.gu at gmail.com>
> 
> Reviewed-by: Brian Masney <bmasney at redhat.com>

Reviewed-by: Ryan Chen <ryan_chen at aspeedtech.com>



More information about the linux-arm-kernel mailing list