From 36ef3da2d760648ba089b14e4f5f03fc5dbb2b87 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Thu, 13 Jun 2024 13:59:43 -0700 Subject: [PATCH] arch: xtensa: fatal: Comply with MISRA Rule 14.4 Use boolean expression in a controlling expression. Signed-off-by: Flavio Ceolin --- arch/xtensa/core/fatal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/core/fatal.c b/arch/xtensa/core/fatal.c index 39e84b86f6b..41a7a8d1409 100644 --- a/arch/xtensa/core/fatal.c +++ b/arch/xtensa/core/fatal.c @@ -87,7 +87,7 @@ char *xtensa_exccause(unsigned int cause_code) void xtensa_fatal_error(unsigned int reason, const struct arch_esf *esf) { #ifdef CONFIG_EXCEPTION_DEBUG - if (esf) { + if (esf != NULL) { /* Don't want to get elbowed by xtensa_switch * in between printing registers and dumping them; * corrupts backtrace