From 5afb9ebe67dfccf6e4cf2bc35ec9bce651f5dbe9 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 3 Jan 2019 17:53:15 +0100 Subject: [PATCH] Remove unnecessary intermediate var --- drivers/serial.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/serial.c b/drivers/serial.c index c7ad543..e5ca24e 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -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; } -- 2.43.0