diff mbox series

[2/2] clk: at91: pmc: decrement node's refcount

Message ID 1588508289-10140-2-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State Mainlined
Commit e218325ff9c31de191d4a617f8fddd3cf78b5550
Headers show
Series [1/2] clk: at91: pmc: do not continue if compatible not located | expand

Commit Message

Claudiu Beznea May 3, 2020, 12:18 p.m. UTC
of_find_matching_node() increment node's refcount. Call
of_node_put() to decrement it after it was used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/clk/at91/pmc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd May 27, 2020, 3:22 a.m. UTC | #1
Quoting Claudiu Beznea (2020-05-03 05:18:09)
> of_find_matching_node() increment node's refcount. Call
> of_node_put() to decrement it after it was used.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index bf0570e66fc1..e164069c81bd 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -278,6 +278,7 @@  static int __init pmc_register_ops(void)
 		return -ENODEV;
 
 	pmcreg = device_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(pmcreg))
 		return PTR_ERR(pmcreg);