diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2018-11-01 14:15:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 16:09:39 +0100 |
commit | 3fc19eac0f361891f287dcfca026c772a91a9db5 (patch) | |
tree | 80f71031911dfb70310733406fa67c60b3ff3427 | |
parent | d75d4fd8c71881a033705baf91f9dc9cf0b4616f (diff) | |
download | linux-stable-3fc19eac0f361891f287dcfca026c772a91a9db5.tar.gz linux-stable-3fc19eac0f361891f287dcfca026c772a91a9db5.tar.bz2 linux-stable-3fc19eac0f361891f287dcfca026c772a91a9db5.zip |
clk: fixed-factor: fix of_node_get-put imbalance
[ Upstream commit f98e8a572bddbf27032114127d2fcc78fa5e6a9d ]
When the fixed factor clock is created by devicetree,
of_clk_add_provider is called. Add a call to
of_clk_del_provider in the remove function to balance
it out.
Reported-by: Alan Tull <atull@kernel.org>
Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/clk/clk-fixed-factor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index 20724abd38bd..7df6b5b1e7ee 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -210,6 +210,7 @@ static int of_fixed_factor_clk_remove(struct platform_device *pdev) { struct clk *clk = platform_get_drvdata(pdev); + of_clk_del_provider(pdev->dev.of_node); clk_unregister_fixed_factor(clk); return 0; |