diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 192b4d5b11..2c5b9df6ed 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -469,6 +469,7 @@ static int uart_tcdrain(FAR uart_dev_t *dev, elapsed = clock_systime_ticks() - start; if (elapsed >= timeout) { + nxmutex_unlock(&dev->xmit.lock); return -ETIMEDOUT; } }