[ASUS_ACPI] work around Samsung P30s oops
[powerpc.git] / kernel / printk.c
index ac8a08f..5287be8 100644 (file)
@@ -956,7 +956,7 @@ int unregister_console(struct console *console)
        if (console_drivers == console) {
                console_drivers=console->next;
                res = 0;
-       } else {
+       } else if (console_drivers) {
                for (a=console_drivers->next, b=console_drivers ;
                     a; b=a, a=b->next) {
                        if (a == console) {