linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()'
Date: Mon, 12 Jun 2017 17:42:40 +0100	[thread overview]
Message-ID: <20170612164240.GA32131@red-moon> (raw)
In-Reply-To: <1497282910-19085-1-git-send-email-daniel.lezcano@linaro.org>

On Mon, Jun 12, 2017 at 05:55:09PM +0200, Daniel Lezcano wrote:
> 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>

Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

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

  parent reply	other threads:[~2017-06-12 16:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170612155441.GE2261@mai>
2017-06-12 15:55 ` [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' Daniel Lezcano
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   ` Lorenzo Pieralisi [this message]
2017-06-12 18:46   ` [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' 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=20170612164240.GA32131@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=daniel.lezcano@linaro.org \
    --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).