Remove unnecessary intermediate var
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 3 Jan 2019 16:53:15 +0000 (17:53 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
drivers/serial.c

index c7ad543..e5ca24e 100644 (file)
@@ -338,12 +338,9 @@ static uint32_t uart_setup(uint32_t uart_num)
  */
 int uart_set_config(uint8_t uart_num, uint32_t config)
 {
-       struct uart_device* uart = NULL;
-
        if (uart_num >= NUM_UARTS)
                return -EINVAL;
-       uart = &uarts[uart_num];
-       uart->config = config;
+       uarts[uart_num].config = config;
        return 0;
 }