thermal/of: add missing of_node_put()
authorJulia Lawall <Julia.Lawall@inria.fr>
Thu, 7 Sep 2023 09:55:18 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:53 +0000 (14:56 +0200)
commit49bdfc83c74a26d418734007eed187b01ba48aa2
treeba0ceb33880300893008accbad17d2293e54a9e3
parentd6a68f16324681749397d1697e0914f80d7b0892
thermal/of: add missing of_node_put()

[ Upstream commit 8a81cf96f5510aaf9a65d103f7405079a7b0fcc5 ]

for_each_child_of_node performs an of_node_get on each
iteration, so a break out of the loop requires an
of_node_put.

This was done using the Coccinelle semantic patch
iterators/for_each_child.cocci

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/thermal_of.c