Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/powermac/pfunc_base: Add missing of_node_put() in macio_gpio_init_one()

Call of_node_put() for the reference 'gparent' escaped out of the
previous for_each_child_of_node() as it has increased the refcount.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220716073111.539739-1-windhl@126.com

authored by

Liang He and committed by
Michael Ellerman
11373c93 b3d6637b

+2
+2
arch/powerpc/platforms/powermac/pfunc_base.c
··· 136 136 for_each_child_of_node(gparent, gp) 137 137 pmf_do_functions(gp, NULL, 0, PMF_FLAGS_ON_INIT, NULL); 138 138 139 + of_node_put(gparent); 140 + 139 141 /* Note: We do not at this point implement the "at sleep" or "at wake" 140 142 * functions. I yet to find any for GPIOs anyway 141 143 */