]> git.itanic.dy.fi Git - linux-stable/commit
powerpc/powernv: Add missing of_node_put()s
authorLiang He <windhl@126.com>
Mon, 20 Jun 2022 13:25:53 +0000 (21:25 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 07:30:29 +0000 (17:30 +1000)
commit605c27f3802038e4623b6fd1bbfa021e1f65b5c4
treea04c43ef53d0de12f9b45572dd162b7344c8ca82
parentafa6a472a3d2a8dd477b285eeb67b3593546647b
powerpc/powernv: Add missing of_node_put()s

In these driver init functions, there are two kinds of errors:

(1) missing of_put_node() for of_find_compatible_node()'s returned
    pointer (refcount incremented)  in fail path or when it is not
    used anymore.
(2) missing of_put_node() for 'for_each_xxx' loop's break

Signed-off-by: Liang He <windhl@126.com>
[mpe: Use out_put_xxx goto label naming]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220620132553.4073863-1-windhl@126.com
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/opal-core.c
arch/powerpc/platforms/powernv/opal-powercap.c
arch/powerpc/platforms/powernv/opal-psr.c
arch/powerpc/platforms/powernv/opal-sensor-groups.c
arch/powerpc/platforms/powernv/opal.c