clk: fixed-factor: fix of_node_get-put imbalance
PATCH 1/1 clk: fixed-factor: fix of_node_get-put imbalance
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 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by Ricardo Ribalda Delgado <[email protected]>
--- drivers/clk/clk-fixed-factor.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-fixed-factor.c +1 -0
@@ -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 ;
Signature · 1 line
2.19.1
Stephen Boyd
maintainerQuoting Ricardo Ribalda Delgado (2018-11-01 06:15:49)
Quoted 9 lines
When the fixed factor clock is created by devicetree,
of_clk_add_provideris called. Add a call toof_clk_del_providerin the remove function to balance it out.Reported-by Alan Tull <[email protected]>Fixes 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")Signed-off-by Ricardo Ribalda Delgado <[email protected]>---
Looks good. I'll queue this up for clk-fixes next week.
Quoting Ricardo Ribalda Delgado (2018-11-01 06:15:49)
Quoted 9 lines
When the fixed factor clock is created by devicetree,
of_clk_add_provideris called. Add a call toof_clk_del_providerin the remove function to balance it out.Reported-by Alan Tull <[email protected]>Fixes 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")Signed-off-by Ricardo Ribalda Delgado <[email protected]>---
Applied to clk-fixes