summaryrefslogtreecommitdiffstats
path: root/src/sleep
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-12-27 15:31:57 +0100
committerMike Yuan <me@yhndnzj.com>2023-12-27 15:38:43 +0100
commitfe33920c2aee9fcde7c4602633f41b6ce1858870 (patch)
treead514f4092ac53a8f6ce647552db21401aa03089 /src/sleep
parenthibernate-util: remove unused code (diff)
downloadsystemd-fe33920c2aee9fcde7c4602633f41b6ce1858870.tar.xz
systemd-fe33920c2aee9fcde7c4602633f41b6ce1858870.zip
sleep: don't log duplicate error
write_resume_config() logs error on its own.
Diffstat (limited to 'src/sleep')
-rw-r--r--src/sleep/sleep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index deb165ead8..31dca446f2 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]);