mirror of https://github.com/thesofproject/sof.git
cnl: dw-dma: Verify dma not NULL
Check if returned DMA is not NULL. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
7f9d39c819
commit
98d3a838cb
|
@ -1150,15 +1150,19 @@ static void dw_dma_irq_cnl(void *data)
|
|||
|
||||
/*check interrupt status of DMA controller 0*/
|
||||
dma = dma_get(DMA_GP_LP_DMAC0);
|
||||
status_intr = dw_read(dma, DW_INTR_STATUS);
|
||||
if (status_intr)
|
||||
dw_dma_irq_handler(dma);
|
||||
if (dma) {
|
||||
status_intr = dw_read(dma, DW_INTR_STATUS);
|
||||
if (status_intr)
|
||||
dw_dma_irq_handler(dma);
|
||||
}
|
||||
|
||||
/*check interrupt status of DMA controller 1*/
|
||||
dma = dma_get(DMA_GP_LP_DMAC1);
|
||||
status_intr = dw_read(dma, DW_INTR_STATUS);
|
||||
if (status_intr)
|
||||
dw_dma_irq_handler(dma);
|
||||
if (dma) {
|
||||
status_intr = dw_read(dma, DW_INTR_STATUS);
|
||||
if (status_intr)
|
||||
dw_dma_irq_handler(dma);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue