Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663097 > unrolled thread

[PATCH] cpuidle: dt: Add missing 'of_node_put()'

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-06-11 14:30 +0200
Last post2017-06-11 14:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] cpuidle: dt: Add missing 'of_node_put()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-06-11 14:30 +0200

#1663097 — [PATCH] cpuidle: dt: Add missing 'of_node_put()'

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-06-11 14:30 +0200
Subject[PATCH] cpuidle: dt: Add missing 'of_node_put()'
Message-ID<tRaad-51n-3@gated-at.bofh.it>
'of_node_put()' should be called on pointer returned by
'of_parse_phandle()' when done. In this function this is done in all path
except this 'continue', so add it.

Fixes: 97735da074fd ("drivers: cpuidle: Add status property to ARM idle states")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/cpuidle/dt_idle_states.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index ffca4fc0061d..ae8eb0359889 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -180,8 +180,10 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
 		if (!state_node)
 			break;
 
-		if (!of_device_is_available(state_node))
+		if (!of_device_is_available(state_node)) {
+			of_node_put(state_node);
 			continue;
+		}
 
 		if (!idle_state_valid(state_node, i, cpumask)) {
 			pr_warn("%s idle state not valid, bailing out\n",
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web