Skip to content

Commit c32b481

Browse files
FRASTMkartben
authored andcommitted
drivers: watchdog: stm32 wwdg check callback before calling
Check that the callback function exists before calling it inside the ISR. Signed-off-by: Francois Ramu <[email protected]>
1 parent 10941ca commit c32b481

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/watchdog/wdt_wwdg_stm32.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ void wwdg_stm32_isr(const struct device *dev)
265265
if (LL_WWDG_IsEnabledIT_EWKUP(wwdg)) {
266266
if (LL_WWDG_IsActiveFlag_EWKUP(wwdg)) {
267267
LL_WWDG_ClearFlag_EWKUP(wwdg);
268-
data->callback(dev, 0);
268+
if (data->callback != NULL) {
269+
data->callback(dev, 0);
270+
}
269271
}
270272
}
271273
}

0 commit comments

Comments
 (0)