drivers/serial: transmit lock should in pairs

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2022-11-03 17:54:58 +08:00 committed by Petro Karashchenko
parent b048428180
commit a53cc533c0

View File

@ -469,6 +469,7 @@ static int uart_tcdrain(FAR uart_dev_t *dev,
elapsed = clock_systime_ticks() - start; elapsed = clock_systime_ticks() - start;
if (elapsed >= timeout) if (elapsed >= timeout)
{ {
nxmutex_unlock(&dev->xmit.lock);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
} }