From: Ludovic Desroches Date: Tue, 24 Nov 2015 09:51:09 +0000 (+0100) Subject: dmaengine: at_xdmac: fix false condition for memset_sg transfers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5a00eb71902292c5a77d7cc27bdafd09ba3c112;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dmaengine: at_xdmac: fix false condition for memset_sg transfers The code was not in agreement with the comments. Signed-off-by: Ludovic Desroches Cc: stable@vger.kernel.org # 4.3 and later Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index d09277f7dd1a..c344f89a77e8 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1333,7 +1333,7 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl, * since we don't care about the stride anymore. */ if ((i == (sg_len - 1)) && - sg_dma_len(ppsg) == sg_dma_len(psg)) { + sg_dma_len(psg) == sg_dma_len(sg)) { dev_dbg(chan2dev(chan), "%s: desc 0x%p can be merged with desc 0x%p\n", __func__, desc, pdesc);