Skip to content

Commit 0783923

Browse files
mstasiaknordiccarlescufi
authored andcommitted
[nrf fromlist] drivers: watchdog: wdt_nrfx: return expected error
According to API docs, wdt_disable() should return EFAULT when called too early. Adjusted driver. Upstream PR #: 100302 Signed-off-by: Michał Stasiak <[email protected]>
1 parent dd5d993 commit 0783923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/wdt_nrfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static int wdt_nrf_disable(const struct device *dev)
7575

7676
if (err_code < 0) {
7777
/* This can only happen if wdt_nrf_setup() is not called first. */
78-
return err_code;
78+
return -EFAULT;
7979
}
8080

8181
#if defined(WDT_NRFX_SYNC_STOP)

0 commit comments

Comments
 (0)