Commit 16cd7764 authored by Arvind Yadav's avatar Arvind Yadav Committed by Stephen Boyd

clk: st: clk-flexgen: Unmap region obtained by of_iomap

Free memory mapping, if probe is not successful.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 113ff9c9
...@@ -329,8 +329,10 @@ static void __init st_of_flexgen_setup(struct device_node *np) ...@@ -329,8 +329,10 @@ static void __init st_of_flexgen_setup(struct device_node *np)
return; return;
parents = flexgen_get_parents(np, &num_parents); parents = flexgen_get_parents(np, &num_parents);
if (!parents) if (!parents) {
iounmap(reg);
return; return;
}
match = of_match_node(flexgen_of_match, np); match = of_match_node(flexgen_of_match, np);
if (match) { if (match) {
...@@ -394,6 +396,7 @@ static void __init st_of_flexgen_setup(struct device_node *np) ...@@ -394,6 +396,7 @@ static void __init st_of_flexgen_setup(struct device_node *np)
return; return;
err: err:
iounmap(reg);
if (clk_data) if (clk_data)
kfree(clk_data->clks); kfree(clk_data->clks);
kfree(clk_data); kfree(clk_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment