diff --git a/examples/platform/silabs/display/demo-ui.c b/examples/platform/silabs/display/demo-ui.c index ed9b5ea282de44..9a534d27d5e536 100644 --- a/examples/platform/silabs/display/demo-ui.c +++ b/examples/platform/silabs/display/demo-ui.c @@ -110,20 +110,17 @@ sl_status_t updateDisplay(void) #if SL_LCDCTRL_MUX status = sl_wfx_host_pre_lcd_spi_transfer(); if(status != SL_STATUS_OK) - { return status; - } #endif // SL_LCDCTRL_MUX status = DMD_updateDisplay(); + if (status != DMD_OK) + return SL_STATUS_FAIL; #if SL_LCDCTRL_MUX status = sl_wfx_host_post_lcd_spi_transfer(); if(status != SL_STATUS_OK) - { return status; - } #endif // SL_LCDCTRL_MUX - if (status != DMD_OK) - return SL_STATUS_FAIL; + return SL_STATUS_OK; } diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c b/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c index 659a222f5a121b..7f18bff87c84f0 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c @@ -147,9 +147,8 @@ uint32_t sl_si91x_host_get_wake_indicator(void) sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration * config) { - sl_status_t status = SL_STATUS_OK; #if SL_SPICTRL_MUX - status = sl_board_disable_display(); + sl_status_t status = sl_board_disable_display(); if (SL_STATUS_OK != status) { SILABS_LOG("sl_board_disable_display failed with error: %x", status); diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c index 2c01be0ab17846..8b37c6cd90f68f 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c @@ -209,7 +209,7 @@ sl_status_t sl_wfx_host_spi_cs_assert(void) sl_status_t sl_wfx_host_spi_cs_deassert(void) { -sl_status_t status = SL_STATUS_OK; + sl_status_t status = SL_STATUS_OK; if (spi_enabled) { status = SPIDRV_DeInit(SL_SPIDRV_HANDLE); @@ -295,11 +295,10 @@ sl_status_t sl_wfx_host_post_bootloader_spi_transfer(void) #if SL_LCDCTRL_MUX sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) { - sl_status_t status = SL_STATUS_OK; #if SL_SPICTRL_MUX xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); #endif // SL_SPICTRL_MUX - status = sl_board_enable_display(); + sl_status_t status = sl_board_enable_display(); if (SL_STATUS_OK == status) { // sl_memlcd_refresh takes care of SPIDRV_Init() @@ -313,11 +312,10 @@ sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) sl_status_t sl_wfx_host_post_lcd_spi_transfer(void) { - sl_status_t status = SL_STATUS_OK; USART_Enable(SL_MEMLCD_SPI_PERIPHERAL, usartDisable); CMU_ClockEnable(SPI_CLOCK(SL_MEMLCD_SPI_PERIPHERAL_NO), false); GPIO->USARTROUTE[SL_MEMLCD_SPI_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; - status = sl_board_disable_display(); + sl_status_t status = sl_board_disable_display(); #if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX diff --git a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c index c8d4736817ab6f..961a67ab9697f0 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c +++ b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c @@ -80,11 +80,10 @@ SemaphoreHandle_t spi_sem_sync_hdl; **********************************************************/ sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) { - sl_status_t status = SL_STATUS_OK; #if SL_SPICTRL_MUX xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); #endif // SL_SPICTRL_MUX - status = sl_board_enable_display(); + sl_status_t status = sl_board_enable_display(); if (SL_STATUS_OK == status) { SPIDRV_SetBaudrate(SL_SPIDRV_LCD_BITRATE); @@ -104,8 +103,7 @@ sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) **********************************************************/ sl_status_t sl_wfx_host_post_lcd_spi_transfer(void) { - sl_status_t status = SL_STATUS_OK; - status = sl_board_disable_display(); + sl_status_t status = sl_board_disable_display(); #if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX