linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org, leonardo.lists@gmail.com,
	gregkh@suse.de, Anatolij Gustschin <agust@denx.de>
Subject: [PATCH] serial: mpc52xx_uart: fix null pointer dereference
Date: Wed,  5 May 2010 00:18:59 +0200	[thread overview]
Message-ID: <1273011539-13994-1-git-send-email-agust@denx.de> (raw)
In-Reply-To: <g2xc2d0b6ec1005041339r9c40822w7a642f9bba976820@mail.gmail.com>

Commit 6acc6833510db8f72b5ef343296d97480555fda9
introduced NULL pointer dereference and kernel crash
on ppc32 machines while booting. Fix this bug now.

Reported-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/serial/mpc52xx_uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index a176ab4..02469c3 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void)
 	/*
 	 * Map the PSC FIFO Controller and init if on MPC512x.
 	 */
-	if (psc_ops->fifoc_init) {
+	if (psc_ops && psc_ops->fifoc_init) {
 		ret = psc_ops->fifoc_init();
 		if (ret)
 			return ret;
-- 
1.7.0.4

  parent reply	other threads:[~2010-05-04 22:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 20:39 Oops in mpc52xx_uart_init (2.6.34-rc5) Leonardo Chiquitto
2010-05-04 21:14 ` Anatolij Gustschin
2010-05-04 22:18 ` Anatolij Gustschin [this message]
2010-05-05 12:40   ` [PATCH] serial: mpc52xx_uart: fix null pointer dereference Leonardo Chiquitto
2010-05-09 22:04   ` Grant Likely
2010-05-10 16:25     ` Greg KH
2010-05-10 20:46       ` Grant Likely

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=1273011539-13994-1-git-send-email-agust@denx.de \
    --to=agust@denx.de \
    --cc=gregkh@suse.de \
    --cc=leonardo.lists@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).