memory: atmel-ebi: add missing of_node_put for loop iteration
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Fri, 23 Apr 2021 10:18:15 +0000 (12:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:54 +0000 (16:17 +0200)
commitb8867ff3b16e8deacd50b001816b24a255044911
tree0511960e6918a070371816d99f3f126f84b1df96
parentec069efdff201d3cf03f0326215372e5e21af9eb
memory: atmel-ebi: add missing of_node_put for loop iteration

[ Upstream commit 907c5bbb514a4676160e79764522fff56ce3448e ]

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

  drivers/memory/atmel-ebi.c:593:1-33: WARNING:
    Function "for_each_available_child_of_node" should have of_node_put() before return around line 604.

Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210423101815.119341-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/memory/atmel-ebi.c