Skip to content

Commit

Permalink
PM / Hibernate: Swap, remove useless check from swsusp_read()
Browse files Browse the repository at this point in the history
It will never reach here if the sws_resume_bdev is erratic.
swsusp_read() is called only from software_resume(), but after
swsusp_check() which would catch the error state.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Jiri Slaby authored and Rafael J. Wysocki committed Feb 26, 2010
1 parent b694e52 commit 09c09bc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kernel/power/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p)
struct swsusp_info *header;

*flags_p = swsusp_header->flags;
if (IS_ERR(resume_bdev)) {
pr_debug("PM: Image device not initialised\n");
return PTR_ERR(resume_bdev);
}

memset(&snapshot, 0, sizeof(struct snapshot_handle));
error = snapshot_write_next(&snapshot, PAGE_SIZE);
Expand Down

0 comments on commit 09c09bc

Please sign in to comment.