diff options
author | Yixun Lan <yixun.lan@amlogic.com> | 2018-04-26 04:44:31 -0400 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2018-05-15 08:18:38 -0400 |
commit | bdfa6394c229e05f78970242e63d660441dc0a17 (patch) | |
tree | ec2d97a240505992feccb6ac3b063e6b232fb31c | |
parent | a565242eb9fca13051ec374b427022a0e22421cf (diff) |
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: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
-rw-r--r-- | drivers/clk/meson/gxbb-aoclk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c index 9ec23ae9a219..eebb580b9e0f 100644 --- a/drivers/clk/meson/gxbb-aoclk.c +++ b/drivers/clk/meson/gxbb-aoclk.c | |||
@@ -191,7 +191,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev) | |||
191 | if (ret) | 191 | if (ret) |
192 | return ret; | 192 | return ret; |
193 | 193 | ||
194 | return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, | 194 | return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, |
195 | &gxbb_aoclk_onecell_data); | 195 | &gxbb_aoclk_onecell_data); |
196 | } | 196 | } |
197 | 197 | ||