mirror of https://gitee.com/openkylin/linux.git
clk: st: clk-flexgen: Unmap region obtained by of_iomap
Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
113ff9c99a
commit
16cd77645b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue