Skip to contentSkip to conversation

clk: fixed-factor: fix of_node_get-put imbalance

PATCH Applied Ricardo Ribalda Delgado 2 participants 3 messages Nov 1, 2018 – Nov 6, 2018 Common clk

lore
Share & tools
lore
#0 lore raw

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.

Fixes 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
---
 drivers/clk/clk-fixed-factor.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/clk-fixed-factor.c +1 -0
index 20724abd38bd..7df6b5b1e7ee 100644
@@ -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
maintainer
#1 lore raw

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_provider is called. Add a call to of_clk_del_provider in the remove function to balance it out.

Fixes 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")

---

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

maintainer Applied
#2 lore raw
In reply to Ricardo Ribalda Delgado

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_provider is called. Add a call to of_clk_del_provider in the remove function to balance it out.

Fixes 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")

---

Applied to clk-fixes