]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/8xx: Add missing of_node_put() in tqm8xx_setup.c
authorLiang He <windhl@126.com>
Sat, 18 Jun 2022 02:49:30 +0000 (10:49 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 07:28:25 +0000 (17:28 +1000)
In init_ioports(), of_find_node_by_name() will return a node pointer
with refcount incremented. The reference should be dropped with
of_node_put() when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220618024930.4056825-1-windhl@126.com
arch/powerpc/platforms/8xx/tqm8xx_setup.c

index 3725d51248df155c9c625d485d1aa905ead24ce5..ffcfd17a5fa30734db9ed5750c34230022f2b76e 100644 (file)
@@ -105,6 +105,9 @@ static void __init init_ioports(void)
        if (dnode == NULL)
                return;
        prop = of_find_property(dnode, "ethernet1", &len);
+
+       of_node_put(dnode);
+
        if (prop == NULL)
                return;