]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/power/console.c
[PATCH] x86-64: split remaining fake nodes equally
[linux-2.6-omap-h63xx.git] / kernel / power / console.c
index 623786d4415950b08c8fb6f3461bfb8c86c152b2..89bcf4973ee51cb8cc8028c6a3cf6a2272367b0a 100644 (file)
@@ -27,7 +27,15 @@ int pm_prepare_console(void)
                return 1;
        }
 
-       set_console(SUSPEND_CONSOLE);
+       if (set_console(SUSPEND_CONSOLE)) {
+               /*
+                * We're unable to switch to the SUSPEND_CONSOLE.
+                * Let the calling function know so it can decide
+                * what to do.
+                */
+               release_console_sem();
+               return 1;
+       }
        release_console_sem();
 
        if (vt_waitactive(SUSPEND_CONSOLE)) {