From fe33920c2aee9fcde7c4602633f41b6ce1858870 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 27 Dec 2023 22:31:57 +0800 Subject: [PATCH] sleep: don't log duplicate error write_resume_config() logs error on its own. --- src/sleep/sleep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index deb165ead89..31dca446f2f 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -253,10 +253,8 @@ static int execute( return r; r = write_resume_config(hibernation_device.devno, hibernation_device.offset, hibernation_device.path); - if (r < 0) { - log_error_errno(r, "Failed to write hibernation device to /sys/power/resume or /sys/power/resume_offset: %m"); + if (r < 0) goto fail; - } } r = write_mode(sleep_config->modes[operation]);