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 <[email protected]>
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
Phil Carmody 2014-09-17 01:00:54 +03:00 • committed by Benjamin Herrenschmidt
commit e702240e83

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