public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	linuxppc-dev list <linuxppc-dev@lists.linuxppc.org>
Subject: [PATCH] ppc32: Fix booting on some OldWolrd Macs
Date: Thu, 19 Aug 2004 07:37:26 +1000	[thread overview]
Message-ID: <1092865044.9529.200.camel@gaston> (raw)

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;



                 reply	other threads:[~2004-08-18 21:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1092865044.9529.200.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox