From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932156AbdFLQl3 (ORCPT ); Mon, 12 Jun 2017 12:41:29 -0400 Received: from foss.arm.com ([217.140.101.70]:37610 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927AbdFLQl1 (ORCPT ); Mon, 12 Jun 2017 12:41:27 -0400 Date: Mon, 12 Jun 2017 17:42:40 +0100 From: Lorenzo Pieralisi To: Daniel Lezcano Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org, Christophe Jaillet , open list Subject: Re: [PATCH 1/2] cpuidle: dt: Add missing 'of_node_put()' Message-ID: <20170612164240.GA32131@red-moon> References: <20170612155441.GE2261@mai> <1497282910-19085-1-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1497282910-19085-1-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 12, 2017 at 05:55:09PM +0200, Daniel Lezcano wrote: > From: Christophe Jaillet > > '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 > Signed-off-by: Daniel Lezcano Acked-by: Lorenzo Pieralisi > --- > 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 >