From 448854c2094e66c783ae7d27fa230e057d6e1ab6 Mon Sep 17 00:00:00 2001 From: Sam Bristow Date: Tue, 9 Oct 2018 23:57:20 +1300 Subject: [PATCH] Return error-code for failing interface Rather than returning the error code for UART1 regardless of which interface had problems, we should return the error code for the interface that actually had an error. Pretty sure this was a simple copy-paste mistake. --- source/c_uart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/c_uart.c b/source/c_uart.c index 211c54e..471c2a9 100644 --- a/source/c_uart.c +++ b/source/c_uart.c @@ -46,13 +46,13 @@ BBIO_err uart_cleanup(void) if (e1 != BBIO_OK) return e1; if (e2 != BBIO_OK) - return e1; + return e2; if (e3 != BBIO_OK) - return e1; + return e3; if (e4 != BBIO_OK) - return e1; + return e4; if (e5 != BBIO_OK) - return e1; + return e5; return BBIO_OK; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy