Skip to content

Commit 60892a3

Browse files
mstasiaknordicnashif
authored andcommitted
drivers: watchdog: wdt_nrfx: return expected error
According to API docs, wdt_disable() should return EFAULT when called too early. Adjusted driver. Signed-off-by: Michał Stasiak <[email protected]>
1 parent bc6edd9 commit 60892a3

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)