Commit bdfa6394 authored by Yixun Lan's avatar Yixun Lan Committed by Jerome Brunet

clk: meson: migrate to devm_of_clk_add_hw_provider API

There is a protential memory leak, as of_clk_del_provider is
never called if of_clk_add_hw_provider has been executed.
Fix this by using devm variant API.

Fixes: f8c11f79 ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Suggested-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarYixun Lan <yixun.lan@amlogic.com>
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
parent a565242e
......@@ -191,7 +191,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
if (ret)
return ret;
return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get,
&gxbb_aoclk_onecell_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