]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - kernel/power/disk.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[linux-2.6.git] / kernel / power / disk.c
index a3c34fb143215ac8d10fa5565ecf2977426e47b1..d72234942798e6606d613cf6c99d5fc72ab40c09 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/fs.h>
 #include <linux/mount.h>
 #include <linux/pm.h>
+#include <linux/cpu.h>
 
 #include "power.h"
 
@@ -72,7 +73,10 @@ static int prepare_processes(void)
        int error;
 
        pm_prepare_console();
-       disable_nonboot_cpus();
+
+       error = disable_nonboot_cpus();
+       if (error)
+               goto enable_cpus;
 
        if (freeze_processes()) {
                error = -EBUSY;
@@ -84,6 +88,7 @@ static int prepare_processes(void)
                return 0;
 thaw:
        thaw_processes();
+enable_cpus:
        enable_nonboot_cpus();
        pm_restore_console();
        return error;