]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
watchdog: shorten watchdog_set_device()
authorFranck Bui <fbui@suse.com>
Fri, 7 Jan 2022 08:28:44 +0000 (09:28 +0100)
committerFranck Bui <fbui@suse.com>
Fri, 7 Jan 2022 08:28:55 +0000 (09:28 +0100)
src/shared/watchdog.c

index ed2998f46cfeb94a9722976ab7c816579127b3c5..ba5a7e26dd21e3fb28482335885f6397e7eac630 100644 (file)
@@ -156,9 +156,6 @@ int watchdog_set_device(const char *path) {
         int r;
 
         r = free_and_strdup(&watchdog_device, path);
-        if (r < 0)
-                return r;
-
         if (r > 0) /* watchdog_device changed */
                 watchdog_fd = safe_close(watchdog_fd);