From ec97fa6d93597dc7e67be1581803bd86fef8d76a Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 24 Jan 2023 14:23:27 +0100 Subject: [PATCH] Fix : out_buff will never be NULL, remove corresponding tests --- drivers/serial.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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]; -- 2.43.0