Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e963b337 authored by Liu Shixin's avatar Liu Shixin Committed by Greg Kroah-Hartman
Browse files

dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()



[ Upstream commit 596b53ccc36a546ab28e8897315c5b4d1d5a0200 ]

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: 9cd4360d ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
Link: https://lore.kernel.org/r/20221122021612.1908866-1-liushixin2@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9b448226
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2747,9 +2747,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
	/* Initialize the channels */
	for_each_child_of_node(node, child) {
		err = xilinx_dma_child_probe(xdev, child);
		if (err < 0)
		if (err < 0) {
			of_node_put(child);
			goto error;
		}
	}

	if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
		for (i = 0; i < xdev->nr_channels; i++)