Patch "dmaengine: imx-sdma: Fix error checking in sdma_event_remap" has been added to the 5.15-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: imx-sdma: Fix error checking in sdma_event_remap

to the 5.15-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-imx-sdma-fix-error-checking-in-sdma_event_.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 00f0122cd36baa21fa7222425389a842545ecfe7
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Tue Mar 8 06:49:51 2022 +0000

    dmaengine: imx-sdma: Fix error checking in sdma_event_remap
    
    [ Upstream commit 7104b9cb35a33ad803a1adbbfa50569b008faf15 ]
    
    of_parse_phandle() returns NULL on errors, rather than error
    pointers. Using NULL check on grp_np to fix this.
    
    Fixes: d078cd1b4185 ("dmaengine: imx-sdma: Add imx6sx platform support")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220308064952.15743-1-linmq006@xxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index cacc725ca545..263f0466b1b8 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1869,7 +1869,7 @@ static int sdma_event_remap(struct sdma_engine *sdma)
 	u32 reg, val, shift, num_map, i;
 	int ret = 0;
 
-	if (IS_ERR(np) || IS_ERR(gpr_np))
+	if (IS_ERR(np) || !gpr_np)
 		goto out;
 
 	event_remap = of_find_property(np, propname, NULL);
@@ -1917,7 +1917,7 @@ static int sdma_event_remap(struct sdma_engine *sdma)
 	}
 
 out:
-	if (!IS_ERR(gpr_np))
+	if (gpr_np)
 		of_node_put(gpr_np);
 
 	return ret;



[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