Merge tag 'fixes-for-v3.18-rc2' of https://github.com/rjarzmik/linux into fixes
[cascardo/linux.git] / drivers / dma / edma.c
index 7b65633..123f578 100644 (file)
@@ -288,7 +288,7 @@ static int edma_slave_config(struct edma_chan *echan,
 static int edma_dma_pause(struct edma_chan *echan)
 {
        /* Pause/Resume only allowed with cyclic mode */
-       if (!echan->edesc->cyclic)
+       if (!echan->edesc || !echan->edesc->cyclic)
                return -EINVAL;
 
        edma_pause(echan->ch_num);