diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-01-27 17:47:56 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-02-26 14:39:11 -0500 |
commit | 09c09bc618a4ceec387c57542031b4fc35826e16 (patch) | |
tree | 36efbdea09ad192e0f1596a39228a1d31da9d8e2 /kernel | |
parent | b694e52ebdd439e4591d4a6651658026196174f6 (diff) |
PM / Hibernate: Swap, remove useless check from swsusp_read()
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/swap.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 09b2b0ae9e9d..1d575733d4e1 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p) | |||
657 | struct swsusp_info *header; | 657 | struct swsusp_info *header; |
658 | 658 | ||
659 | *flags_p = swsusp_header->flags; | 659 | *flags_p = swsusp_header->flags; |
660 | if (IS_ERR(resume_bdev)) { | ||
661 | pr_debug("PM: Image device not initialised\n"); | ||
662 | return PTR_ERR(resume_bdev); | ||
663 | } | ||
664 | 660 | ||
665 | memset(&snapshot, 0, sizeof(struct snapshot_handle)); | 661 | memset(&snapshot, 0, sizeof(struct snapshot_handle)); |
666 | error = snapshot_write_next(&snapshot, PAGE_SIZE); | 662 | error = snapshot_write_next(&snapshot, PAGE_SIZE); |