summaryrefslogtreecommitdiff
path: root/kernel/locking/rtmutex_api.c
diff options
context:
space:
mode:
authorHaotian Zhang <vulab@iscas.ac.cn>2025-10-30 14:16:03 +0800
committerGeert Uytterhoeven <geert+renesas@glider.be>2025-11-12 11:09:23 +0100
commitf8def051bbcf8677f64701e9699bf6d11e2780cd (patch)
tree9f8a75c5edb9ca30fab5e98daf45a5fd884991fc /kernel/locking/rtmutex_api.c
parent7a9d0318da5d1d148021d9c9762cefecb552c54f (diff)
clk: renesas: r9a06g032: Fix memory leak in error path
The current code uses of_iomap() to map registers but never calls iounmap() on any error path after the mapping. This causes a memory leak when probe fails after successful ioremap, for example when of_clk_add_provider() or r9a06g032_add_clk_domain() fails. Replace of_iomap() with devm_of_iomap() to automatically unmap the region on probe failure. Update the error check accordingly to use IS_ERR() and PTR_ERR() since devm_of_iomap() returns ERR_PTR on error. Fixes: 4c3d88526eba ("clk: renesas: Renesas R9A06G032 clock driver") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20251030061603.1954-1-vulab@iscas.ac.cn Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'kernel/locking/rtmutex_api.c')
0 files changed, 0 insertions, 0 deletions