diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c index 13ecd313426..e0026bfa006 100644 --- a/drivers/serial/uart_nrfx_uarte.c +++ b/drivers/serial/uart_nrfx_uarte.c @@ -662,9 +662,7 @@ static int uarte_nrfx_rx_counting_init(const struct device *dev) nrfx_timer_enable(&cfg->timer); nrfx_timer_clear(&cfg->timer); } - } - if (HW_RX_COUNTING_ENABLED(data)) { ret = gppi_channel_alloc(&data->async->rx_cnt.ppi); if (ret != NRFX_SUCCESS) { LOG_ERR("Failed to allocate PPI Channel, " @@ -672,9 +670,7 @@ static int uarte_nrfx_rx_counting_init(const struct device *dev) data->async->hw_rx_counting = false; nrfx_timer_uninit(&cfg->timer); } - } - if (HW_RX_COUNTING_ENABLED(data)) { #if CONFIG_HAS_HW_NRF_PPI ret = nrfx_ppi_channel_assign( data->async->rx_cnt.ppi,