diff --git a/sys/xtimer/xtimer_core.c b/sys/xtimer/xtimer_core.c index 59d22560c5..20a67397b8 100644 --- a/sys/xtimer/xtimer_core.c +++ b/sys/xtimer/xtimer_core.c @@ -31,6 +31,7 @@ #include "periph_conf.h" #endif +#include "assert.h" #include "xtimer.h" #include "irq.h" @@ -65,7 +66,9 @@ void xtimer_init(void) { #ifndef MODULE_XTIMER_ON_ZTIMER /* initialize low-level timer */ - timer_init(XTIMER_DEV, XTIMER_HZ, _periph_timer_callback, NULL); + int ret = timer_init(XTIMER_DEV, XTIMER_HZ, _periph_timer_callback, NULL); + (void)ret; + assert(ret == 0); #endif /* register initial overflow tick */ diff --git a/sys/ztimer/periph_timer.c b/sys/ztimer/periph_timer.c index 3c45a22227..c1214199e4 100644 --- a/sys/ztimer/periph_timer.c +++ b/sys/ztimer/periph_timer.c @@ -20,6 +20,7 @@ * @} */ +#include "assert.h" #include "irq.h" #include "ztimer/periph_timer.h" @@ -79,6 +80,8 @@ void ztimer_periph_timer_init(ztimer_periph_timer_t *clock, tim_t dev, clock->dev = dev; clock->super.ops = &_ztimer_periph_timer_ops; clock->super.max_value = max_val; - timer_init(dev, freq, _ztimer_periph_timer_callback, clock); + int ret = timer_init(dev, freq, _ztimer_periph_timer_callback, clock); + (void)ret; + assert(ret == 0); ztimer_init_extend(&clock->super); }