clk: st: clk-flexgen: Unmap region obtained by of_iomap
PATCH v2 1/1 clk: st: clk-flexgen: Unmap region obtained by of_iomap
From: Arvind Yadav <[email protected]>
Free memory mapping, if probe is not successful.
Signed-off-by Arvind Yadav <[email protected]>
--- drivers/clk/st/clk-flexgen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clk/st/clk-flexgen.c +4 -1
@@ -278,8 +278,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 ; + } clk_data =kzalloc (sizeof (*clk_data),GFP_KERNEL );if (!clk_data)
@@ -337,6 +339,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);
Signature · 1 line
1.7.9.5
Stephen Boyd
AppliedQuoted 6 lines · Arvind yadav
From: Arvind Yadav <[email protected]>
Free memory mapping, if probe is not successful.
Signed-off-by Arvind Yadav <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project