From a53cc533c0f8736d5a8144dce6d7566028224d2f Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 3 Nov 2022 17:54:58 +0800 Subject: [PATCH] drivers/serial: transmit lock should in pairs Signed-off-by: chao an --- drivers/serial/serial.c | 1 + 1 file changed, 1 insertion(+) 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; } }