diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-02-12 15:58:29 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2018-03-13 10:03:57 +0100 |
commit | 332b32a23225e01cdfac4fb6cb1c76553f906cb5 (patch) | |
tree | 370cff15e6bea757c7bcc489b46c36ba27e19b8b /drivers/clk/meson/axg.c | |
parent | 323346d31d68542b133088c7fe043c234f26eee4 (diff) | |
download | linux-332b32a23225e01cdfac4fb6cb1c76553f906cb5.tar.bz2 |
clk: meson: use devm_of_clk_add_hw_provider
There is no remove callbacks in meson's clock controllers and
of_clk_del_provider is never called if of_clk_add_hw_provider has been
executed, introducing a potential memory leak.
Fixing this by the using the devm variant.
In reality, the leak would never happen since these controllers are
never unloaded once in use ... still, this is worth cleaning.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/axg.c')
-rw-r--r-- | drivers/clk/meson/axg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 1f48649a7d2a..e16d53b6be30 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -854,8 +854,8 @@ static int axg_clkc_probe(struct platform_device *pdev) } } - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, - clkc_data->hw_onecell_data); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, + clkc_data->hw_onecell_data); } static struct platform_driver axg_driver = { |