mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
devm_kasprintf() returns NULL when memory allocation fails. Currently,
raspberrypi_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.
Fixes: 93d2725aff ("clk: bcm: rpi: Discover the firmware clocks")
Signed-off-by: Henry Martin <[email protected]>
Reviewed-by: Dave Stevenson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Stefan Wahren <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>