diff --git a/drivers/usbhost/usbhost_trace.c b/drivers/usbhost/usbhost_trace.c index bc9963893c..e6c16944ba 100644 --- a/drivers/usbhost/usbhost_trace.c +++ b/drivers/usbhost/usbhost_trace.c @@ -170,6 +170,7 @@ void usbhost_trace_common(uint32_t event) } } } + leave_critical_section(flags); } #endif /* CONFIG_USBHOST_TRACE */ @@ -202,7 +203,10 @@ void usbhost_trace1(uint16_t id, uint32_t u23) /* Get the format associated with the trace */ fmt = usbhost_trformat1(id); - DEBUGASSERT(fmt); + if (fmt == NULL) + { + return; + } /* Just print the data using syslog() */ @@ -220,7 +224,10 @@ void usbhost_trace2(uint16_t id, uint8_t u7, uint16_t u16) /* Get the format associated with the trace */ fmt = usbhost_trformat2(id); - DEBUGASSERT(fmt); + if (fmt == NULL) + { + return; + } /* Just print the data using syslog() */