From cc22442d3836f1859d19ad33dc9e308d158a012d Mon Sep 17 00:00:00 2001 From: Adrian Bonislawski Date: Mon, 17 Jun 2019 14:39:23 +0200 Subject: [PATCH] dma: add missing error handling in dma_trace_start Signed-off-by: Adrian Bonislawski --- src/lib/dma-trace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/dma-trace.c b/src/lib/dma-trace.c index e7b8c508a..8121dd495 100644 --- a/src/lib/dma-trace.c +++ b/src/lib/dma-trace.c @@ -195,6 +195,8 @@ static int dma_trace_start(struct dma_trace_data *d) err = dma_sg_alloc(&config.elem_array, RZONE_SYS, config.direction, elem_num, elem_size, elem_addr, 0); + if (err < 0) + return err; err = dma_set_config(d->dc.dmac, d->dc.chan, &config); if (err < 0)