From: Nathael Pajani Date: Thu, 3 Jan 2019 16:53:15 +0000 (+0100) Subject: Remove unnecessary intermediate var X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=5afb9ebe67dfccf6e4cf2bc35ec9bce651f5dbe9;p=soft%2Flpc122x%2Fcore Remove unnecessary intermediate var --- 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; }