From a73b7b1b0e1b4469d95ac4b2a13a031499a9e76a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 18 Oct 2021 11:17:11 +0200 Subject: [PATCH] watchdog: fix error code handling --- src/shared/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c index 4de6003039..8a551fb5c8 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -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); -- 2.25.1