Skip to content

Commit

Permalink
clk: fixed-factor: fix of_node_get-put imbalance
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 971451b ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
ribalda authored and bebarino committed Nov 6, 2018
1 parent 6510223 commit f98e8a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/clk-fixed-factor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f98e8a5

Please sign in to comment.