[PATCH] ppc32: Fix booting on some OldWolrd Macs

From: Benjamin Herrenschmidt
Date: Wed Aug 18 2004 - 16:49:04 EST


Hi !

It seems that on some OldWolrd macs, we don't get the OF stdout device,
thus the new set_preferred_console() dies at boot trying to dereference
a NULL pointer. Here's a fix:

===== arch/ppc/kernel/setup.c 1.59 vs edited =====
--- 1.59/arch/ppc/kernel/setup.c 2004-07-27 08:27:53 +10:00
+++ edited/arch/ppc/kernel/setup.c 2004-08-18 21:38:17 +10:00
@@ -484,6 +484,9 @@
char *name;
int offset;

+ if (of_stdout_device == NULL)
+ return -ENODEV;
+
/* The user has requested a console so this is already set up. */
if (strstr(saved_command_line, "console="))
return -EBUSY;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/