ARM: shmobile: rcar-gen2: Add missing of_node_put()
authorWan Jiabing <wanjiabing@vivo.com>
Mon, 18 Oct 2021 01:45:03 +0000 (21:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:11 +0000 (10:54 +0100)
commitff452db96163ce8961c4878065ae763e942e7904
treeb97940f70ab7a4bf95bf496f8d79fe036f4dee19
parentff2138d6c2a3a57347de902ecbda873e5c1725b6
ARM: shmobile: rcar-gen2: Add missing of_node_put()

[ Upstream commit 85744f2d938c5f3cfc44cb6533c157469634da93 ]

Fix following coccicheck warning:
./arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c:156:1-33: Function
for_each_matching_node_and_match should have of_node_put() before break
and goto.

Early exits from for_each_matching_node_and_match() should decrement the
node reference counter.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20211018014503.7598-1-wanjiabing@vivo.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c