diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index d9f161b18a..b2719e62a2 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -877,7 +877,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } else { - count = dev->xmit.size - (dev->xmit.head - dev->xmit.tail); + count = dev->xmit.size - (dev->xmit.head - dev->xmit.tail) - 1; } irqrestore(state);