From: jon-hunter@ti•com (Jon Hunter)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: omap2: gpmc: Remove unneeded of_node_put()
Date: Fri, 25 Jan 2013 08:18:11 -0600 [thread overview]
Message-ID: <51029423.2040106@ti.com> (raw)
In-Reply-To: <1359116387-32613-1-git-send-email-ezequiel.garcia@free-electrons.com>
On 01/25/2013 06:19 AM, Ezequiel Garcia wrote:
> for_each_node_by_name() automatically calls of_node_put() on each
> node passed; so don't do it explicitly unless there's an error.
>
> Reported-by: Mark Rutland <mark.rutland@arm•com>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons•com>
> ---
> arch/arm/mach-omap2/gpmc.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index 01ce462..c6255f7 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -1271,9 +1271,10 @@ static int gpmc_probe_dt(struct platform_device *pdev)
>
> for_each_node_by_name(child, "nand") {
> ret = gpmc_probe_nand_child(pdev, child);
> - of_node_put(child);
> - if (ret < 0)
> + if (ret < 0) {
> + of_node_put(child);
> return ret;
> + }
> }
>
> return 0;
>
Acked-by: Jon Hunter <jon-hunter@ti•com>
Thanks!
Jon
next prev parent reply other threads:[~2013-01-25 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 12:19 [PATCH] ARM: omap2: gpmc: Remove unneeded of_node_put() Ezequiel Garcia
2013-01-25 14:18 ` Jon Hunter [this message]
2013-02-01 21:59 ` Tony Lindgren
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=51029423.2040106@ti.com \
--to=jon-hunter@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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