Fix : out_buff will never be NULL, remove corresponding tests
authorNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 24 Jan 2023 13:23:27 +0000 (14:23 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 24 Jan 2023 13:23:27 +0000 (14:23 +0100)
drivers/serial.c

index ebaa2c2..c11fd40 100644 (file)
@@ -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];