From 1c56f87321bb6f84979e04d69001ca257d313a05 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Mon, 9 Mar 2020 22:35:50 +0100 Subject: [PATCH] kernel: fatal: fix indentation in z_fatal_error Fix indentation error in z_fatal_error(). Signed-off-by: Ioannis Glaropoulos --- kernel/fatal.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/kernel/fatal.c b/kernel/fatal.c index 419e5a7e746..f3a149c6b55 100644 --- a/kernel/fatal.c +++ b/kernel/fatal.c @@ -152,26 +152,26 @@ void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf) } else { /* Test mode */ #if defined(CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION) - if ((esf != NULL) && arch_is_in_nested_exception(esf)) { - /* Abort the thread only on STACK Sentinel check fail. */ + if ((esf != NULL) && arch_is_in_nested_exception(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 + if (reason != K_ERR_STACK_CHK_FAIL) { arch_irq_unlock(key); return; -#endif /* CONFIG_STACK_SENTINEL */ - } else { - /* Abort the thread only if the fault is not due to - * a spurious ISR handler triggered. - */ - if (reason == K_ERR_SPURIOUS_IRQ) { - arch_irq_unlock(key); - return; - } } +#else + arch_irq_unlock(key); + return; +#endif /* CONFIG_STACK_SENTINEL */ + } else { + /* Abort the thread only if the fault is not due to + * a spurious ISR handler triggered. + */ + if (reason == K_ERR_SPURIOUS_IRQ) { + arch_irq_unlock(key); + return; + } + } #endif /*CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION */ }