]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
watchdog: fix error code handling
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Oct 2021 09:17:11 +0000 (11:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Oct 2021 09:27:39 +0000 (11:27 +0200)
src/shared/watchdog.c

index 4de6003039a4196a40830cae10f202493c4cba0c..8a551fb5c8674952c71f4716cba1262f50402e82 100644 (file)
@@ -107,7 +107,7 @@ static int update_timeout(void) {
         if (watchdog_timeout == USEC_INFINITY) {
                 r = watchdog_get_timeout();
                 if (r < 0)
-                        return log_error_errno(errno, "Failed to query watchdog HW timeout: %m");
+                        return log_error_errno(r, "Failed to query watchdog HW timeout: %m");
         }
 
         r = watchdog_set_enable(true);