diff options
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 6541ebf8bf63..bbb4be5a3ff4 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -819,8 +819,11 @@ static void fsl_dma_update_completed_cookie(struct fsldma_chan *chan) | |||
819 | desc = to_fsl_desc(chan->ld_running.prev); | 819 | desc = to_fsl_desc(chan->ld_running.prev); |
820 | if (dma_is_idle(chan)) | 820 | if (dma_is_idle(chan)) |
821 | cookie = desc->async_tx.cookie; | 821 | cookie = desc->async_tx.cookie; |
822 | else | 822 | else { |
823 | cookie = desc->async_tx.cookie - 1; | 823 | cookie = desc->async_tx.cookie - 1; |
824 | if (unlikely(cookie < DMA_MIN_COOKIE)) | ||
825 | cookie = DMA_MAX_COOKIE; | ||
826 | } | ||
824 | 827 | ||
825 | chan->completed_cookie = cookie; | 828 | chan->completed_cookie = cookie; |
826 | 829 | ||