Re: [PATCH] clk: fixed-factor: fix of_node_get-put imbalance

2018-11-06 Thread Stephen Boyd
Quoting Ricardo Ribalda Delgado (2018-11-01 06:15:49)
> 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 
> Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform 
> driver")
> Signed-off-by: Ricardo Ribalda Delgado 
> ---

Applied to clk-fixes



Re: [PATCH] clk: fixed-factor: fix of_node_get-put imbalance

2018-11-01 Thread Stephen Boyd
Quoting Ricardo Ribalda Delgado (2018-11-01 06:15:49)
> 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 
> Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform 
> driver")
> Signed-off-by: Ricardo Ribalda Delgado 
> ---

Looks good. I'll queue this up for clk-fixes next week.



[PATCH] clk: fixed-factor: fix of_node_get-put imbalance

2018-11-01 Thread Ricardo Ribalda Delgado
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 
Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: Ricardo Ribalda Delgado 
---
 drivers/clk/clk-fixed-factor.c | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.19.1