Skip to content
Commit 3db7285e authored by Bosi Zhang's avatar Bosi Zhang Committed by Stephen Boyd
Browse files

clk: mediatek: fix of_iomap memory leak



Smatch reports:
drivers/clk/mediatek/clk-mtk.c:583 mtk_clk_simple_probe() warn:
    'base' from of_iomap() not released on lines: 496.

This problem was also found in linux-next. In mtk_clk_simple_probe(),
base is not released when handling errors
if clk_data is not existed, which may cause a leak.
So free_base should be added here to release base.

Fixes: c58cd0e4 ("clk: mediatek: Add mtk_clk_simple_probe() to simplify clock providers")
Signed-off-by: default avatarBosi Zhang <u201911157@hust.edu.cn>
Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230422084331.47198-1-u201911157@hust.edu.cn


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 18eb864f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment