]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
clk: cdce925: check return value of kasprintf()
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Tue, 30 May 2023 09:39:07 +0000 (12:39 +0300)
committerStephen Boyd <sboyd@kernel.org>
Sat, 17 Jun 2023 04:52:49 +0000 (21:52 -0700)
commitbb7d09ddbf361d51eae46f38e7c8a2b85914ea2a
tree09c0803f75ae1d360513704086cba2201beff56a
parent144601f6228de5598f03e693822b60a95c367a17
clk: cdce925: check return value of kasprintf()

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: 19fbbbbcd3a3 ("Add TI CDCE925 I2C controlled clock synthesizer driver")
Depends-on: e665f029a283 ("clk: Convert to using %pOFn instead of device_node.name")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230530093913.1656095-3-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-cdce925.c