From 51ed697de1df4483ecf01b1841189b90a5cd89b0 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Fri, 13 Oct 2017 07:37:51 -0600 Subject: [PATCH] stm32f7 BBSRAM: stm32_bbsram: avoid assert in stm32_bbsram_savepanic. If panic happens before stm32_bbsram is initialized, stm32_bbsram_savepanic caused additional assert panic. Function has null pointer check, so drop DEBUGASSERT. --- arch/arm/src/stm32f7/stm32_bbsram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/src/stm32f7/stm32_bbsram.c b/arch/arm/src/stm32f7/stm32_bbsram.c index 6a1466ea1b..3b5b94ed2d 100644 --- a/arch/arm/src/stm32f7/stm32_bbsram.c +++ b/arch/arm/src/stm32f7/stm32_bbsram.c @@ -834,8 +834,6 @@ int stm32_bbsram_savepanic(int fileno, uint8_t *context, int length) bbf = g_bbsram[fileno].bbf; - DEBUGASSERT(bbf); - /* If the g_bbsram has been nulled out we return ENXIO. * * As once ensures we will keep the first dump. Checking the time for @@ -844,7 +842,7 @@ int stm32_bbsram_savepanic(int fileno, uint8_t *context, int length) * loop. */ - if (!bbf) + if (bbf == NULL) { ret = -ENXIO; }