clk: fixed-rate: fix of_node_get-put imbalance
PATCH 1/1 clk: fixed-rate: fix of_node_get-put imbalance
When the fixed rate 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.
--- drivers/clk/clk-fixed-rate.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-fixed-rate.c +1 -0
@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev) {struct clk *clk =platform_get_drvdata (pdev); +of_clk_del_provider (pdev->dev.of_node);clk_unregister_fixed_rate (clk);return 0 ;
Signature · 1 line
2.16.2
Stephen Boyd
maintainerQuoting Alan Tull (2018-10-18 12:54:11)
Quoted 7 lines
When the fixed rate clock is created by devicetree,
of_clk_add_provideris called. Add a call toof_clk_del_providerin the remove function to balance it out.Signed-off-by Alan Tull <[email protected]>---
Fixes tag? I'll tack one on.
Quoted 15 lines
drivers/clk/clk-fixed-rate.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/clk-fixed-rate.c +1
-0@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev) {struct clk *clk =platform_get_drvdata (pdev); +of_clk_del_provider (pdev->dev.of_node);clk_unregister_fixed_rate (clk);return 0 ;
Quoted 11 lines · Stephen Boyd
Quoting Alan Tull (2018-10-18 12:54:11)
Quoted 7 lines
When the fixed rate clock is created by devicetree,
of_clk_add_provideris called. Add a call toof_clk_del_providerin the remove function to balance it out.Signed-off-by Alan Tull <[email protected]>---
Fixes tag? I'll tack one on.
Fixes 435779fe1336 ("clk: fixed-rate: Convert into a module platform driver")
Thanks!
Alan
Quoted 16 lines
Quoted 16 lines
drivers/clk/clk-fixed-rate.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/clk-fixed-rate.c +1
-0@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev) {struct clk *clk =platform_get_drvdata (pdev); +of_clk_del_provider (pdev->dev.of_node);clk_unregister_fixed_rate (clk);return 0 ;