arch: xtensa: fatal: Comply with MISRA Rule 14.4

Use boolean expression in a controlling expression.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2024-06-13 13:59:43 -07:00 committed by Anas Nashif
parent 490251d779
commit 36ef3da2d7

View file

@ -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