Patch "dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dmaengine-xilinx_dma-call-of_node_put-when-breaking-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 85c5e73e33dcc1aaadcce3643fcf2d3a2dd98125
Author: Liu Shixin <liushixin2@xxxxxxxxxx>
Date:   Tue Nov 22 10:16:12 2022 +0800

    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: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
    Signed-off-by: Liu Shixin <liushixin2@xxxxxxxxxx>
    Acked-by: Peter Korsgaard <peter@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221122021612.1908866-1-liushixin2@xxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 7b60248be725..be44c86a1e03 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2747,8 +2747,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) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux