lkml.org 
[lkml]   [2020]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] clk: at91: pmc: decrement node's refcount
Date
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(+)

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

--
2.7.4
\
 
 \ /
  Last update: 2020-05-03 14:20    [W:0.036 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site