dma-trace: Use mtrace_printf() if dtrace buffer allocation fails

Printing the error via dtrace is not going to work when the memory for
the dtrace is not allocated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This commit is contained in:
Peter Ujfalusi 2021-10-15 09:16:00 +03:00 committed by Liam Girdwood
parent ed7067f7f4
commit 384403dfaf
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ static int dma_trace_buffer_init(struct dma_trace_data *d)
buf = rballoc_align(0, SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_DMA, buf = rballoc_align(0, SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_DMA,
DMA_TRACE_LOCAL_SIZE, addr_align); DMA_TRACE_LOCAL_SIZE, addr_align);
if (!buf) { if (!buf) {
tr_err(&dt_tr, "dma_trace_buffer_init(): alloc failed"); mtrace_printf(LOG_LEVEL_ERROR, "dma_trace_buffer_init(): alloc failed");
return -ENOMEM; return -ENOMEM;
} }