From: Nathael Pajani Date: Thu, 15 Jun 2017 07:01:06 +0000 (+0200) Subject: uart->out_buff cannot be NULL, remove this tests. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=3af7099f0e346fd174500a9bb2755e5416d75ffa;p=soft%2Flpc82x%2Fcore uart->out_buff cannot be NULL, remove this tests. --- 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;