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 <yzli.cs@realtek.com>
This commit is contained in:
YunZe Li 2024-03-08 11:22:32 +08:00 committed by Henrik Brix Andersen
parent 90be983d4d
commit 8c19142278

View file

@ -33,7 +33,7 @@ static int wdt_counter_setup(const struct device *dev, uint8_t options)
const struct wdt_counter_config *config = dev->config;
const struct device *counter = config->counter;
if ((options & WDT_OPT_PAUSE_IN_SLEEP) || (options & WDT_OPT_PAUSE_IN_SLEEP)) {
if ((options & WDT_OPT_PAUSE_IN_SLEEP) || (options & WDT_OPT_PAUSE_HALTED_BY_DBG)) {
return -ENOTSUP;
}