Commit 73c46d9
clk: bcm: rpi: Add NULL check in raspberrypi_clk_register()
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: 93d2725 ("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]>1 parent d6fbdae commit 73c46d9
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
289 | 291 | | |
290 | 292 | | |
291 | 293 | | |
| |||
0 commit comments