aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2004-08-22 00:34:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 00:34:52 -0700
commita971c4c2b69bde7307637087eb402576420143c9 (patch)
treedd8c267c5bc12905378b628b761e5dfefd9267dc /arch
parenta72f691a43d614ca678a9b3516c8fd0df6545858 (diff)
downloadhistory-a971c4c2b69bde7307637087eb402576420143c9.tar.gz
[PATCH] ppc32: Fix booting on some OldWolrd Macs
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. Trivial fix.
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/kernel/setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 376f7369c73379..092035ae1a12da 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -484,6 +484,9 @@ static int __init set_preferred_console(void)
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;