mirror of https://github.com/thesofproject/sof.git
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 <guido.roncarolo@nxp.com> Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
This commit is contained in:
parent
6154b59e3b
commit
61b0b58865
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue