[Sound-open-firmware] [PATCH] dw-dma: fix element might be used uninitialized issue

Keyon Jie yang.jie at linux.intel.com
Fri Nov 10 08:33:24 CET 2017


The dma_sg_elem might be used uninitialized if the callback
function forget to do that.

Here adding initialization to fix that.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
 src/drivers/dw-dma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c
index 05791e6..9aeb612 100644
--- a/src/drivers/dw-dma.c
+++ b/src/drivers/dw-dma.c
@@ -735,6 +735,7 @@ static void dw_dma_irq_handler(void *data)
 		if ((status_tfr & mask) &&
 			(p->chan[i].cb_type & DMA_IRQ_TYPE_LLIST)) {
 
+			next.src = next.dest = DMA_RELOAD_LLI;
 			next.size = DMA_RELOAD_LLI; /* will reload lli by default */
 			if (p->chan[i].cb)
 				p->chan[i].cb(p->chan[i].cb_data,
-- 
2.11.0



More information about the Sound-open-firmware mailing list