aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/user.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index d6a8dcc26ae5..bf211fee1222 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -368,9 +368,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
368 if (error) { 368 if (error) {
369 printk(KERN_ERR "Failed to suspend some devices.\n"); 369 printk(KERN_ERR "Failed to suspend some devices.\n");
370 } else { 370 } else {
371 /* Enter S3, system is already frozen */ 371 error = disable_nonboot_cpus();
372 suspend_enter(PM_SUSPEND_MEM); 372 if (!error) {
373 373 /* Enter S3, system is already frozen */
374 suspend_enter(PM_SUSPEND_MEM);
375 enable_nonboot_cpus();
376 }
374 /* Wake up devices */ 377 /* Wake up devices */
375 device_resume(); 378 device_resume();
376 } 379 }