From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org, Phil Carmody <pc+lkml@asdf.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH RESEND 2/2] powerpc/via-pmu: fix OF node leak in Keylargo init
Date: Mon, 8 Dec 2014 03:57:38 +0200 [thread overview]
Message-ID: <1418003858-870-2-git-send-email-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <1418003858-870-1-git-send-email-aaro.koskinen@iki.fi>
From: Phil Carmody <pc+lkml@asdf.org>
If we of_find_node_by_name() then we must of_node_put() too.
Signed-off-by: Phil Carmody <pc+lkml@asdf.org>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
drivers/macintosh/via-pmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 6221235..aed3cb0 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -329,6 +329,7 @@ int __init find_via_pmu(void)
gaddr = of_translate_address(gpiop, reg);
if (gaddr != OF_BAD_ADDR)
gpio_reg = ioremap(gaddr, 0x10);
+ of_node_put(gpiop);
}
if (gpio_reg == NULL) {
printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n");
--
2.2.0
prev parent reply other threads:[~2014-12-08 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 1:57 [PATCH RESEND 1/2] powerpc/via-pmu: fix error path in find_via_pmu() Aaro Koskinen
2014-12-08 1:57 ` Aaro Koskinen [this message]
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=1418003858-870-2-git-send-email-aaro.koskinen@iki.fi \
--to=aaro.koskinen@iki.fi \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pc+lkml@asdf.org \
/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).