From: Nathael Pajani Date: Tue, 24 Jan 2023 13:23:27 +0000 (+0100) Subject: Fix : out_buff will never be NULL, remove corresponding tests X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=ec97fa6d93597dc7e67be1581803bd86fef8d76a;p=soft%2Flpc122x%2Fcore Fix : out_buff will never be NULL, remove corresponding tests --- diff --git a/drivers/serial.c b/drivers/serial.c index ebaa2c2..c11fd40 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -105,7 +105,7 @@ static void uart_check_tx(struct uart_device* uart, uint32_t intr) { /* We are currently sending, send next char */ if ((intr & LPC_UART_INT_MASK) == LPC_UART_INT_TX) { - if (uart->out_buff && uart->sending && (uart->out_length > uart->sending)) { + if (uart->sending && (uart->out_length > uart->sending)) { uart->regs->func.buffer = uart->out_buff[uart->sending]; uart->sending++; } else { @@ -140,9 +140,6 @@ static void uart_start_sending(uint32_t uart_num) { struct uart_device* uart = &uarts[uart_num]; - if (uart->out_buff == NULL) - return; - if (!uart->sending && (uart->out_length != 0)) { uart->sending++; uart->regs->func.buffer = uart->out_buff[0];