Skip to content

Commit 596b53c

Browse files
Liu Shixinvinodkoul
authored andcommitted
dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()
Since for_each_child_of_node() will increase the refcount of node, we need to call of_node_put() manually when breaking out of the iteration. Fixes: 9cd4360 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Liu Shixin <[email protected]> Acked-by: Peter Korsgaard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1417f59 commit 596b53c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/xilinx/xilinx_dma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3143,8 +3143,10 @@ static int xilinx_dma_probe(struct platform_device *pdev)
31433143
/* Initialize the channels */
31443144
for_each_child_of_node(node, child) {
31453145
err = xilinx_dma_child_probe(xdev, child);
3146-
if (err < 0)
3146+
if (err < 0) {
3147+
of_node_put(child);
31473148
goto error;
3149+
}
31483150
}
31493151

31503152
if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {

0 commit comments

Comments
 (0)