From: Arvind Yadav Date: Tue, 20 Sep 2016 08:30:42 +0000 (+0530) Subject: clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af9083627b4764272a341902e37af17188bc17f0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap Free memory mapping if init is not successful. Signed-off-by: Arvind Yadav Reviewed-by: James Liao Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c index 10c986018a08..0ac3aee87726 100644 --- a/drivers/clk/mediatek/clk-mt8173.c +++ b/drivers/clk/mediatek/clk-mt8173.c @@ -1074,8 +1074,10 @@ static void __init mtk_apmixedsys_init(struct device_node *node) } mt8173_pll_clk_data = clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); - if (!clk_data) + if (!clk_data) { + iounmap(base); return; + } mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);