From 3af7099f0e346fd174500a9bb2755e5416d75ffa Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 15 Jun 2017 09:01:06 +0200 Subject: [PATCH] uart->out_buff cannot be NULL, remove this tests. --- drivers/serial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/serial.c b/drivers/serial.c index f5e561d..f74c789 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -118,9 +118,8 @@ static void uart_check_tx(struct uart_device* uart, uint32_t intr) { /* We are currently sending, send next char */ if (intr & LPC_UART_ST_TX_READY) { - if (uart->out_buff && uart->sending && (uart->out_length > uart->sending)) { - uart->regs->tx_data = uart->out_buff[uart->sending]; - uart->sending++; + if (uart->sending && (uart->out_length > uart->sending)) { + uart->regs->tx_data = uart->out_buff[uart->sending++]; } else { uart->sending = 0; uart->regs->inten_clear = LPC_UART_ST_TX_READY; -- 2.43.0