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
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}