From: Arvind Yadav Date: Mon, 19 Sep 2016 08:21:24 +0000 (+0530) Subject: clk: st: clk-flexgen: Unmap region obtained by of_iomap X-Git-Tag: v5.15~12045^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16cd77645bddbcee951c63b964f23826dadbfd2e;p=platform%2Fkernel%2Flinux-starfive.git clk: st: clk-flexgen: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index a485f3b..918ba31 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -329,8 +329,10 @@ static void __init st_of_flexgen_setup(struct device_node *np) return; parents = flexgen_get_parents(np, &num_parents); - if (!parents) + if (!parents) { + iounmap(reg); return; + } match = of_match_node(flexgen_of_match, np); if (match) { @@ -394,6 +396,7 @@ static void __init st_of_flexgen_setup(struct device_node *np) return; err: + iounmap(reg); if (clk_data) kfree(clk_data->clks); kfree(clk_data);