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>
This commit is contained in:
Phil Carmody 2014-09-17 01:00:54 +03:00 committed by Benjamin Herrenschmidt
parent ffa3eb010d
commit e702240e83
1 changed files with 1 additions and 0 deletions

View File

@ -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");