mirror of https://github.com/thesofproject/sof.git
alloc.c: fix DEBUG_TRACE_PTR() not to trace before trace is initialized
As reported in #4759, #4636 and a few others linked from there. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
4f273961ab
commit
3ff1dc0277
|
@ -646,13 +646,13 @@ out:
|
|||
}
|
||||
|
||||
#define DEBUG_TRACE_PTR(ptr, bytes, zone, caps, flags) \
|
||||
do { \
|
||||
if (trace_get()) { \
|
||||
if (!ptr) { \
|
||||
tr_err(&mem_tr, "failed to alloc 0x%x bytes zone 0x%x caps 0x%x flags 0x%x", \
|
||||
bytes, zone, caps, flags); \
|
||||
alloc_trace_heap(zone, caps, bytes); \
|
||||
} \
|
||||
} while (0)
|
||||
}
|
||||
|
||||
#else
|
||||
#define DEBUG_TRACE_PTR(ptr, bytes, zone, caps, flags)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue