From e702240e8364952e260829c8700fbc870aa4b053 Mon Sep 17 00:00:00 2001 From: Phil Carmody Date: Wed, 17 Sep 2014 01:00:54 +0300 Subject: [PATCH] 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 Signed-off-by: Aaro Koskinen Signed-off-by: Benjamin Herrenschmidt --- 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 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"); -- 2.20.1