watchdog: shorten watchdog_set_device()

This commit is contained in:
Franck Bui
2022-01-07 09:28:55 +01:00
parent 299d941723
commit 8ce08c8e97
-3
View 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);