Skip to content

Commit 8c19142

Browse files
YunZe Lihenrikbrixandersen
authored andcommitted
drivers: watchdog: fix wdt_counter_setup option checking condition
The expression (options & WDT_OPT_PAUSE_IN_SLEEP) is duplicated. Fix it by replacing the second one with (options &WDT_OPT_PAUSE_HALTED_BY_DBG). Signed-off-by: YunZe Li <[email protected]>
1 parent 90be983 commit 8c19142

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/wdt_counter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static int wdt_counter_setup(const struct device *dev, uint8_t options)
3333
const struct wdt_counter_config *config = dev->config;
3434
const struct device *counter = config->counter;
3535

36-
if ((options & WDT_OPT_PAUSE_IN_SLEEP) || (options & WDT_OPT_PAUSE_IN_SLEEP)) {
36+
if ((options & WDT_OPT_PAUSE_IN_SLEEP) || (options & WDT_OPT_PAUSE_HALTED_BY_DBG)) {
3737
return -ENOTSUP;
3838
}
3939

0 commit comments

Comments
 (0)