thermal/drivers/sprd: Add missing of_node_put for loop iteration
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Mon, 14 Jun 2021 19:22:30 +0000 (21:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:36:16 +0000 (14:36 +0200)
commit8c12a3a68d4f89b0cc4f58603a2e43cae8c9748c
tree36dc7a6d43e38a87bdd6df26d29900489a95d42a
parent20babcd830922e3aa233c95515cd2052bd6da71f
thermal/drivers/sprd: Add missing of_node_put for loop iteration

[ Upstream commit d8ac5bb4ae653e092d7429a7587b73f1662d6ad7 ]

Early exits from for_each_available_child_of_node() should decrement the
node reference counter.  Reported by Coccinelle:

  drivers/thermal/sprd_thermal.c:387:1-23: WARNING:
    Function "for_each_child_of_node" should have of_node_put() before goto around lines 391.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210614192230.19248-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/sprd_thermal.c