summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-01-27 23:47:56 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2010-02-26 20:39:11 +0100
commit09c09bc618a4ceec387c57542031b4fc35826e16 (patch)
tree36efbdea09ad192e0f1596a39228a1d31da9d8e2 /kernel/power
parentb694e52ebdd439e4591d4a6651658026196174f6 (diff)
downloadlinux-09c09bc618a4ceec387c57542031b4fc35826e16.tar.bz2
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/power')
-rw-r--r--kernel/power/swap.c4
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)
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);