From 85574ad023c69ebfc727d5871f4ea2f26e4b1932 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 5 Apr 2016 17:40:51 -0600 Subject: [PATCH] Olimex STM32 H407: Handle initialization errors consistently --- configs/olimex-stm32-h407/src/stm32_bringup.c | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/configs/olimex-stm32-h407/src/stm32_bringup.c b/configs/olimex-stm32-h407/src/stm32_bringup.c index 0907d78a3c..9c683a1158 100644 --- a/configs/olimex-stm32-h407/src/stm32_bringup.c +++ b/configs/olimex-stm32-h407/src/stm32_bringup.c @@ -105,7 +105,9 @@ int stm32_bringup(void) ret = stm32_can_initialize(); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to initialize CAN: %d\n", ret); + syslog(LOG_ERR, + "ERROR: Failed to initialize CAN: %d\n", + ret); } #endif @@ -115,7 +117,9 @@ int stm32_bringup(void) ret = stm32_adc_initialize(); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to initialize ADC: %d\n", ret); + syslog(LOG_ERR, + "ERROR: Failed to initialize ADC: %d\n", + ret); } #endif @@ -125,8 +129,9 @@ int stm32_bringup(void) ret = stm32_sdio_initialize(); if (ret != OK) { - fdbg("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); - return ret; + syslog(LOG_ERR, + "ERROR: Failed to initialize MMC/SD driver: %d\n", + ret); } #endif @@ -138,8 +143,9 @@ int stm32_bringup(void) ret = stm32_usbhost_initialize(); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; + syslog(LOG_ERR, + "ERROR: Failed to initialize USB host: %d\n", + ret); } #endif @@ -149,7 +155,9 @@ int stm32_bringup(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + syslog(LOG_ERR, + "ERROR: Failed to start USB monitor: %d\n", + ret); } #endif