Skip to content

Commit

Permalink
sleep: don't log duplicate error
Browse files Browse the repository at this point in the history
write_resume_config() logs error on its own.
  • Loading branch information
YHNdnzj committed Dec 27, 2023
1 parent 6e819bd commit fe33920
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/sleep/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit fe33920

Please sign in to comment.