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

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

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
1d003eb0 ff1ae209

+5
+1
drivers/clk/rockchip/clk-rk3036.c
··· 453 453 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 454 454 if (IS_ERR(ctx)) { 455 455 pr_err("%s: rockchip clk init failed\n", __func__); 456 + iounmap(reg_base); 456 457 return; 457 458 } 458 459
+1
drivers/clk/rockchip/clk-rk3188.c
··· 773 773 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 774 774 if (IS_ERR(ctx)) { 775 775 pr_err("%s: rockchip clk init failed\n", __func__); 776 + iounmap(reg_base); 776 777 return ERR_PTR(-ENOMEM); 777 778 } 778 779
+1
drivers/clk/rockchip/clk-rk3228.c
··· 640 640 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 641 641 if (IS_ERR(ctx)) { 642 642 pr_err("%s: rockchip clk init failed\n", __func__); 643 + iounmap(reg_base); 643 644 return; 644 645 } 645 646
+1
drivers/clk/rockchip/clk-rk3288.c
··· 893 893 ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS); 894 894 if (IS_ERR(ctx)) { 895 895 pr_err("%s: rockchip clk init failed\n", __func__); 896 + iounmap(rk3288_cru_base); 896 897 return; 897 898 } 898 899
+1
drivers/clk/rockchip/clk-rk3368.c
··· 875 875 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 876 876 if (IS_ERR(ctx)) { 877 877 pr_err("%s: rockchip clk init failed\n", __func__); 878 + iounmap(reg_base); 878 879 return; 879 880 } 880 881