aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/power/disk.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index fa3b43b7206..77ac605bf20 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -133,15 +133,15 @@ int hibernation_snapshot(int platform_mode)
/* Free memory before shutting down devices. */
error = swsusp_shrink_memory();
if (error)
- goto Finish;
-
- error = platform_prepare(platform_mode);
- if (error)
- goto Finish;
+ return error;
suspend_console();
error = device_suspend(PMSG_FREEZE);
if (error)
+ goto Resume_console;
+
+ error = platform_prepare(platform_mode);
+ if (error)
goto Resume_devices;
error = disable_nonboot_cpus();
@@ -159,8 +159,8 @@ int hibernation_snapshot(int platform_mode)
Resume_devices:
platform_finish(platform_mode);
device_resume();
+ Resume_console:
resume_console();
- Finish:
return error;
}
@@ -191,8 +191,8 @@ int hibernation_restore(int platform_mode)
enable_nonboot_cpus();
}
platform_restore_cleanup(platform_mode);
- Finish:
device_resume();
+ Finish:
resume_console();
pm_restore_console();
return error;