From: Lars-Peter Clausen Date: Sun, 7 Sep 2014 13:54:39 +0000 (+0200) Subject: dmaengine: jz4740: Fix non-cyclic descriptor completion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f498e064e0b97df910163533e78e2704ba0a9570;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dmaengine: jz4740: Fix non-cyclic descriptor completion We need to make sure to deqeueue the descriptor from the active list before we call vchan_cookie_complete(). Also we need obviously only set chan->desc to NULL after we stopped using it. Signed-off-by: Lars-Peter Clausen Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c index 6a9d89c93b1f..ae2ab14e64b3 100644 --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c @@ -362,8 +362,9 @@ static void jz4740_dma_chan_irq(struct jz4740_dmaengine_chan *chan) vchan_cyclic_callback(&chan->desc->vdesc); } else { if (chan->next_sg == chan->desc->num_sgs) { - chan->desc = NULL; + list_del(&chan->desc->vdesc.node); vchan_cookie_complete(&chan->desc->vdesc); + chan->desc = NULL; } } }