Commit a83715ba authored by Bartosz Bilas's avatar Bartosz Bilas Committed by Fabio Utzig
Browse files

boot: zephyr: return NULL if stm32 watchdog is not enabled



Return the device pointer if the node identifier
refers to a watchdog node with status “okay”,
otherwise return NULL.

Signed-off-by: default avatarBartosz Bilas <bartosz.bilas@hotmail.com>
parent 71ae3357
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@
#define MCUBOOT_WATCHDOG_FEED() \
    do {                        \
        const struct device* wdt =                                  \
            DEVICE_DT_GET(DT_INST(0, st_stm32_watchdog));     \
            DEVICE_DT_GET_OR_NULL(DT_INST(0, st_stm32_watchdog));   \
        if (device_is_ready(wdt)) {                                 \
            wdt_feed(wtd, 0);                                       \
        }                                                           \