]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: mv_xor: fix child node refcount handling in early exit
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Fri, 11 Oct 2024 20:57:59 +0000 (22:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:24:57 +0000 (13:24 +0100)
commite87dbcfdf1c0854a1f88bae5beed22bee9264585
tree6e5c3c01cbe62e1bf0694df8fd72b0e41e90a1ba
parent619a5aeb0f0d30df9a51b755fbba331b7c526666
dmaengine: mv_xor: fix child node refcount handling in early exit

commit 362f1bf98a3ecb5a2a4fcbdaa9718c8403beceb2 upstream.

The for_each_child_of_node() loop requires explicit calls to
of_node_put() to decrement the child's refcount upon early exits (break,
goto, return).

Add the missing calls in the two early exits before the goto
instructions.

Cc: stable@vger.kernel.org
Fixes: f7d12ef53ddf ("dma: mv_xor: add Device Tree binding")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241011-dma_mv_xor_of_node_put-v1-1-3c2de819f463@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/mv_xor.c