Patch "dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure" has been added to the 5.19-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: Report error in case of dma_set_mask_and_coherent API failure

to the 5.19-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-report-error-in-case-of-dma_set.patch
and it can be found in the queue-5.19 subdirectory.

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



commit dc08246055d9edf68ca583cdb661cbdb6cb1f343
Author: Swati Agarwal <swati.agarwal@xxxxxxxxxx>
Date:   Wed Aug 17 11:41:25 2022 +0530

    dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
    
    [ Upstream commit 8f2b6bc79c32f0fa60df000ae387a790ec80eae9 ]
    
    The driver does not handle the failure case while calling
    dma_set_mask_and_coherent API.
    
    In case of failure, capture the return value of API and then report an
    error.
    
    Addresses-coverity: Unchecked return value (CHECKED_RETURN)
    
    Signed-off-by: Swati Agarwal <swati.agarwal@xxxxxxxxxx>
    Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220817061125.4720-4-swati.agarwal@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 f63ec9d862ff..7ce8bb160a59 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -3211,7 +3211,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)
 		xdev->ext_addr = false;
 
 	/* Set the dma mask bits */
-	dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
+	err = dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width));
+	if (err < 0) {
+		dev_err(xdev->dev, "DMA mask error %d\n", err);
+		goto disable_clks;
+	}
 
 	/* Initialize the DMA engine */
 	xdev->common.dev = &pdev->dev;



[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