mirror of https://github.com/thesofproject/sof.git
dma-trace: dma_sg_free() can not be used to free SOF_MEM_ZONE_SYS allocations
dma_sg_alloc() is called with SOF_MEM_ZONE_SYS which can not be freed up. dma config or start error skip the free as it is not going to work anyways. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This commit is contained in:
parent
9c3452330d
commit
1ae525ad37
|
@ -379,22 +379,19 @@ static int dma_trace_start(struct dma_trace_data *d)
|
||||||
config.direction,
|
config.direction,
|
||||||
elem_num, elem_size, elem_addr, 0);
|
elem_num, elem_size, elem_addr, 0);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_alloc;
|
goto error;
|
||||||
|
|
||||||
err = dma_set_config(d->dc.chan, &config);
|
err = dma_set_config(d->dc.chan, &config);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
mtrace_printf(LOG_LEVEL_ERROR, "dma_set_config() failed: %d", err);
|
mtrace_printf(LOG_LEVEL_ERROR, "dma_set_config() failed: %d", err);
|
||||||
goto err_config;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = dma_start(d->dc.chan);
|
err = dma_start(d->dc.chan);
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_config:
|
error:
|
||||||
dma_sg_free(&config.elem_array);
|
|
||||||
|
|
||||||
err_alloc:
|
|
||||||
dma_channel_put(d->dc.chan);
|
dma_channel_put(d->dc.chan);
|
||||||
d->dc.chan = NULL;
|
d->dc.chan = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue