powerpc/powermac: fix OF node refcount leak

We need to call of_node_put() for device nodes obtained with
of_find_node_by_name().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Dmitry Torokhov 2017-01-31 09:43:55 -08:00 committed by Michael Ellerman
parent f2c2cbcc35
commit 2aaf0a198d
1 changed files with 1 additions and 0 deletions

View File

@ -604,6 +604,7 @@ static int pmacpic_find_viaint(void)
if (np == NULL)
goto not_found;
viaint = irq_of_parse_and_map(np, 0);
of_node_put(np);
not_found:
#endif /* CONFIG_ADB_PMU */