Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663794
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' |
| Date | 2017-06-12 18:00 +0200 |
| Message-ID | <tRzV1-40Z-33@gated-at.bofh.it> (permalink) |
| References | <tRzV1-40Z-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
'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>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
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 ffca4fc..ae8eb03 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.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-12 18:00 +0200
[PATCH 2/2] ARM: cpuidle: Support asymmetric idle definition Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-12 18:00 +0200
Re: [PATCH 2/2] ARM: cpuidle: Support asymmetric idle definition "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 21:00 +0200
Re: [PATCH 2/2] ARM: cpuidle: Support asymmetric idle definition Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-12 21:20 +0200
Re: [PATCH 2/2] ARM: cpuidle: Support asymmetric idle definition Sudeep Holla <sudeep.holla@arm.com> - 2017-06-13 11:50 +0200
Re: [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-06-12 18:50 +0200
Re: [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-12 21:00 +0200
csiph-web