]> git.baikalelectronics.ru Git - kernel.git/commit
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:10:51 +0000 (16:10 +0200)
commitf1917079bbbdadf2f96f5d578f32f0ebba198f54
tree3e442153662941933efa4260a29352b28de311a8
parent99f9a7f1b18aae8354edb4434598c8dd7dfe56af
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: 34cfdc1fc27f ("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