nrf_802154: nrf_802154_serialization_error never returns

Functions nrf_802154_serialization_error and
nrf_802154_sl_fault_handler shall never return.
However `__ASSERT()` might expand to an empty instruction
CONFIG_ASSERT=n and is not enough to stop execution.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
This commit is contained in:
Andrzej Kuros 2023-05-23 08:11:16 +02:00 committed by Carles Cufí
commit 174b7f4775
2 changed files with 3 additions and 0 deletions

View file

@ -1144,6 +1144,7 @@ void nrf_802154_energy_detection_failed(nrf_802154_ed_error_t error)
void nrf_802154_serialization_error(const nrf_802154_ser_err_data_t *err)
{
__ASSERT(false, "802.15.4 serialization error: %d", err->reason);
k_oops();
}
#endif

View file

@ -13,9 +13,11 @@ void nrf_802154_serialization_error(const nrf_802154_ser_err_data_t *err)
{
(void)err;
__ASSERT(false, "802.15.4 serialization error");
k_oops();
}
void nrf_802154_sl_fault_handler(uint32_t id, int32_t line, const char *err)
{
__ASSERT(false, "module_id: %u, line: %d, %s", id, line, err);
k_oops();
}