summaryrefslogtreecommitdiff
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorPhil Carmody <pc+lkml@asdf.org>2014-09-17 02:00:54 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-17 03:56:51 +0300
commite702240e8364952e260829c8700fbc870aa4b053 (patch)
treebf26df8c5883058515bff0c4c6bb13d48208a485 /drivers/macintosh
parentffa3eb010dd8edc696cd958ba684d8a6d1cf3dff (diff)
downloadlinux-e702240e8364952e260829c8700fbc870aa4b053.tar.xz
powerpc/via-pmu: fix OF node leak in Keylargo init
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> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/via-pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 62212358640d..aed3cb07a6fa 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");