This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f462be5365 risc-v/espressif: Fix NULL-dereferencing in WDT interrupt
handling
f462be5365 is described below
commit f462be5365894817c8529f620fc7c0f64fb4e253
Author: Gustavo Henrique Nihei <[email protected]>
AuthorDate: Tue Mar 28 09:46:46 2023 -0300
risc-v/espressif: Fix NULL-dereferencing in WDT interrupt handling
Signed-off-by: Gustavo Henrique Nihei <[email protected]>
---
arch/risc-v/src/espressif/esp_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/risc-v/src/espressif/esp_wdt.c
b/arch/risc-v/src/espressif/esp_wdt.c
index f423218b46..9688f943d6 100644
--- a/arch/risc-v/src/espressif/esp_wdt.c
+++ b/arch/risc-v/src/espressif/esp_wdt.c
@@ -74,7 +74,7 @@ struct esp_wdt_lowerhalf_s
uint32_t lastreset; /* The last reset time */
bool started; /* True: Timer has been started */
xcpt_t handler; /* User Handler */
- void * upper; /* Pointer to watchdog_upperhalf_s */
+ void *upper; /* Pointer to watchdog_upperhalf_s */
};
/****************************************************************************
@@ -577,7 +577,7 @@ int esp_wdt_initialize(void)
/* Attach the handler for the timer IRQ */
- irq_attach(ESP_IRQ_TG0_WDT_LEVEL, (xcpt_t)wdt_handler, NULL);
+ irq_attach(ESP_IRQ_TG0_WDT_LEVEL, (xcpt_t)wdt_handler, lower);
/* Enable the allocated CPU interrupt */