From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
Alexander Stein <alexander.stein@systec-electronic.com>
Subject: [PATCH v2] pch_uart: Don't oops if dmi_get_system_info returns NULL
Date: Thu, 9 Jun 2011 13:21:15 +0200 [thread overview]
Message-ID: <1307618475-7273-1-git-send-email-alexander.stein@systec-electronic.com> (raw)
In-Reply-To: <20110608144419.e5b3034c.akpm@linux-foundation.org>
This oops was observed on an Atom based board which has no BIOS, but
a bootloder which doesn't privde DMI data.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
Changesin v2:
* Adjust summary
* Describe when dmi_get_system_info could return NULL
If this is ok, i will send an updated patch for the pch_phub too.
drivers/tty/serial/pch_uart.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index f2cb750..4652109 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1397,6 +1397,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
int fifosize, base_baud;
int port_type;
struct pch_uart_driver_data *board;
+ const char *board_name;
board = &drv_dat[id->driver_data];
port_type = board->port_type;
@@ -1412,7 +1413,8 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
base_baud = 1843200; /* 1.8432MHz */
/* quirk for CM-iTC board */
- if (strstr(dmi_get_system_info(DMI_BOARD_NAME), "CM-iTC"))
+ board_name = dmi_get_system_info(DMI_BOARD_NAME);
+ if (board_name && strstr(board_name, "CM-iTC"))
base_baud = 192000000; /* 192.0MHz */
switch (port_type) {
--
1.7.3.4
prev parent reply other threads:[~2011-06-09 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 12:11 [PATCH] pch_uart: Don't panic " Alexander Stein
2011-06-08 21:44 ` Andrew Morton
2011-06-09 11:21 ` Alexander Stein [this message]
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=1307618475-7273-1-git-send-email-alexander.stein@systec-electronic.com \
--to=alexander.stein@systec-electronic.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®