Skip to content

Commit 2fb6483

Browse files
ankunsrlubos
authored andcommitted
[nrf fromtree] 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 Kuros <[email protected]> (cherry picked from commit 174b7f4)
1 parent 793180f commit 2fb6483

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/ieee802154/ieee802154_nrf5.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ void nrf_802154_energy_detection_failed(nrf_802154_ed_error_t error)
12421242
void nrf_802154_serialization_error(const nrf_802154_ser_err_data_t *err)
12431243
{
12441244
__ASSERT(false, "802.15.4 serialization error: %d", err->reason);
1245+
k_oops();
12451246
}
12461247
#endif
12471248

samples/boards/nrf/ieee802154/802154_rpmsg/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ void nrf_802154_serialization_error(const nrf_802154_ser_err_data_t *err)
1313
{
1414
(void)err;
1515
__ASSERT(false, "802.15.4 serialization error");
16+
k_oops();
1617
}
1718

1819
void nrf_802154_sl_fault_handler(uint32_t id, int32_t line, const char *err)
1920
{
2021
__ASSERT(false, "module_id: %u, line: %d, %s", id, line, err);
22+
k_oops();
2123
}

0 commit comments

Comments
 (0)