Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: rockchip: release io resource when failing to init clk on rk3399

We should call iounmap to relase reg_base since it's not going
to be used any more if failing to init clk.

This was missing on the newly added rk3399 clock tree.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Shawn Lin and committed by
Heiko Stuebner
62d0e71d 3183c0d5

+2
+2
drivers/clk/rockchip/clk-rk3399.c
··· 1510 1510 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 1511 1511 if (IS_ERR(ctx)) { 1512 1512 pr_err("%s: rockchip clk init failed\n", __func__); 1513 + iounmap(reg_base); 1513 1514 return; 1514 1515 } 1515 1516 ··· 1556 1555 ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS); 1557 1556 if (IS_ERR(ctx)) { 1558 1557 pr_err("%s: rockchip pmu clk init failed\n", __func__); 1558 + iounmap(reg_base); 1559 1559 return; 1560 1560 } 1561 1561