kernel: fatal: unlock IRQs in early return points in z_fatal_error

We need to unlock IRQs in early return points of
z_fatal_error() functions; not only at the normal
return point.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2020-02-14 15:32:53 +01:00 committed by Johan Hedberg
commit 3a3364eef8

View file

@ -156,9 +156,11 @@ void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
/* Abort the thread only on STACK Sentinel check fail. */
#if defined(CONFIG_STACK_SENTINEL)
if (reason != K_ERR_STACK_CHK_FAIL) {
arch_irq_unlock(key);
return;
}
#else
arch_irq_unlock(key);
return;
#endif /* CONFIG_STACK_SENTINEL */
}