powerpc/44x/fsp2: add missing of_node_put
authorBixuan Cui <cuibixuan@linux.alibaba.com>
Thu, 28 Oct 2021 07:28:22 +0000 (15:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:57 +0000 (19:16 +0100)
commitd6b102db217f7bce0ff7205105c41fc32ba8f38e
treea9710fa130180b99a43c0f388c344842fbd3a806
parent5a85790059385a051f1f647af37e8bac21674e61
powerpc/44x/fsp2: add missing of_node_put

[ Upstream commit 290fe8aa69ef5c51c778c0bb33f8ef0181c769f5 ]

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

./arch/powerpc/platforms/44x/fsp2.c:206:1-25: WARNING: Function
"for_each_compatible_node" should have of_node_put() before return
around line 218.

Fixes: 7813043e1bbc ("powerpc/44x/fsp2: Add irq error handlers")
Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1635406102-88719-1-git-send-email-cuibixuan@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/44x/fsp2.c