mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()
[ Upstream commit596b53ccc3
] 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:9cd4360de6
("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Liu Shixin <liushixin2@huawei.com> Acked-by: Peter Korsgaard <peter@korsgaard.com> Link: https://lore.kernel.org/r/20221122021612.1908866-1-liushixin2@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bb73b985d2
commit
9714a6c69a
1 changed files with 3 additions and 1 deletions
|
@ -2759,8 +2759,10 @@ 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) {
|
||||
|
|
Loading…
Reference in a new issue