Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/trace/dma-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,9 @@ static int dma_trace_buffer_init(struct dma_trace_data *d)
uint32_t addr_align;
int err;

/*
* Keep the existing dtrace buffer to avoid memory leak, unlikely to
* happen if host correctly using the dma_trace_disable().
*
* The buffer can not be freed up here as it is likely in use.
* The (re-)initialization will happen in dma_trace_start() when it is
* safe to do (the DMA is stopped)
*/
/* Keep the existing dtrace buffer to avoid memory leak */
if (dma_trace_initialized(d))
return 0;
goto print_banners;

if (!d || !d->dc.dmac) {
mtrace_printf(LOG_LEVEL_ERROR,
Expand Down Expand Up @@ -317,6 +310,7 @@ static int dma_trace_buffer_init(struct dma_trace_data *d)
}
#endif

print_banners:
#ifdef __ZEPHYR__
#define ZEPHYR_VER_OPT " zephyr:" META_QUOTE(BUILD_VERSION)
#else
Expand Down