From 61b0b58865b30d97e329439eb377b4462381545a Mon Sep 17 00:00:00 2001 From: Guido Roncarolo Date: Wed, 16 Oct 2019 16:57:08 +0200 Subject: [PATCH] drivers: imx: edma: avoid accessing register for non ready channels avoid accessing registers for EDMA channels that are not started to prevent crash Signed-off-by: Guido Roncarolo Signed-off-by: Jerome Laclavere --- src/drivers/imx/edma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/imx/edma.c b/src/drivers/imx/edma.c index 7150b1e52..e2f688030 100644 --- a/src/drivers/imx/edma.c +++ b/src/drivers/imx/edma.c @@ -435,6 +435,9 @@ static int edma_remove(struct dma *dma) static int edma_interrupt(struct dma_chan_data *channel, enum dma_irq_cmd cmd) { + if (channel->status != COMP_STATE_INIT) + return 0; + switch (cmd) { case DMA_IRQ_STATUS_GET: return dma_chan_reg_read(channel, EDMA_CH_INT);