Commit 35b3e230 authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Greg Kroah-Hartman

clk: fixed-factor: fix of_node_get-put imbalance

[ Upstream commit f98e8a57 ]

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: default avatarAlan Tull <atull@kernel.org>
Fixes: 971451b3 ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c6b1ef11
......@@ -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;
......
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