aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/hibernate.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r--kernel/power/hibernate.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index aeabd26e3342..50aae660174d 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -273,8 +273,11 @@ static int create_image(int platform_mode)
273 local_irq_disable(); 273 local_irq_disable();
274 274
275 error = sysdev_suspend(PMSG_FREEZE); 275 error = sysdev_suspend(PMSG_FREEZE);
276 if (!error) 276 if (!error) {
277 error = syscore_suspend(); 277 error = syscore_suspend();
278 if (error)
279 sysdev_resume();
280 }
278 if (error) { 281 if (error) {
279 printk(KERN_ERR "PM: Some system devices failed to power down, " 282 printk(KERN_ERR "PM: Some system devices failed to power down, "
280 "aborting hibernation\n"); 283 "aborting hibernation\n");
@@ -407,8 +410,11 @@ static int resume_target_kernel(bool platform_mode)
407 local_irq_disable(); 410 local_irq_disable();
408 411
409 error = sysdev_suspend(PMSG_QUIESCE); 412 error = sysdev_suspend(PMSG_QUIESCE);
410 if (!error) 413 if (!error) {
411 error = syscore_suspend(); 414 error = syscore_suspend();
415 if (error)
416 sysdev_resume();
417 }
412 if (error) 418 if (error)
413 goto Enable_irqs; 419 goto Enable_irqs;
414 420