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)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 14 Jun 2021 20:42:09 +0000 (22:42 +0200)
commitd8ac5bb4ae653e092d7429a7587b73f1662d6ad7
tree0a270457eca47e2943435c770b1e103841873174
parent3da97620e8d60da4a7eaae46e03e0a494780642d
thermal/drivers/sprd: Add missing of_node_put for loop iteration

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
drivers/thermal/sprd_thermal.c