From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: rjw@rjwysocki.net
Cc: linux-pm@vger.kernel.org,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()'
Date: Mon, 12 Jun 2017 17:55:09 +0200 [thread overview]
Message-ID: <1497282910-19085-1-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20170612155441.GE2261@mai>
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
next prev parent reply other threads:[~2017-06-12 15:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 15:54 [GIT PULL] ARM: cpuidle for 4.13 Daniel Lezcano
2017-06-12 15:55 ` Daniel Lezcano [this message]
2017-06-12 15:55 ` [PATCH 2/2] ARM: cpuidle: Support asymmetric idle definition Daniel Lezcano
2017-06-12 18:49 ` Rafael J. Wysocki
2017-06-12 19:17 ` Daniel Lezcano
2017-06-22 12:25 ` Daniel Lezcano
2017-06-22 14:27 ` Rafael J. Wysocki
2017-06-13 9:46 ` Sudeep Holla
2017-06-12 16:42 ` [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' Lorenzo Pieralisi
2017-06-12 18:46 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497282910-19085-1-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).