clk: clocking-wizard: check return value of devm_kasprintf()
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Tue, 30 May 2023 09:39:13 +0000 (12:39 +0300)
committerStephen Boyd <sboyd@kernel.org>
Sat, 17 Jun 2023 04:52:50 +0000 (21:52 -0700)
commitb1356ed1a4461de06dfdc02bf549c3e8750162e5
treec711dff4ddbc011229ee35208f7a82b500fabc5f
parentbd46cd0b802d9c9576ca78007aa084ae3e74907b
clk: clocking-wizard: check return value of devm_kasprintf()

devm_kasprintf() returns a pointer to dynamically allocated memory.
Pointer could be NULL in case allocation fails. Check pointer validity.
Identified with coccinelle (kmerr.cocci script).

Fixes: 2046338dcbc6 ("ARM: mxs: Use soc bus infrastructure")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230530093913.1656095-9-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/xilinx/clk-xlnx-clock-wizard.c