summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds2011-03-09 23:04:40 +0100
committerLinus Torvalds2011-03-09 23:04:40 +0100
commit6b684cd5799cd1e691024ca3a688d1cdec9d4824 (patch)
tree02fde30c141438b2b7fb96e141fbe5ceb17c4e96
parentMerge branch 'for-2639-rc7/i2c-fixes' of git://git.fluff.org/bjdooks/linux (diff)
parentwatchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME (diff)
downloadkernel-qcow2-linux-6b684cd5799cd1e691024ca3a688d1cdec9d4824.tar.gz
kernel-qcow2-linux-6b684cd5799cd1e691024ca3a688d1cdec9d4824.tar.xz
kernel-qcow2-linux-6b684cd5799cd1e691024ca3a688d1cdec9d4824.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME
-rw-r--r--drivers/watchdog/sbc_fitpc2_wdt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index c7d67e9a7465..79906255eeb6 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -201,11 +201,14 @@ static struct miscdevice fitpc2_wdt_miscdev = {
static int __init fitpc2_wdt_init(void)
{
int err;
+ const char *brd_name;
- if (!strstr(dmi_get_system_info(DMI_BOARD_NAME), "SBC-FITPC2"))
+ brd_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ if (!brd_name || !strstr(brd_name, "SBC-FITPC2"))
return -ENODEV;
- pr_info("%s found\n", dmi_get_system_info(DMI_BOARD_NAME));
+ pr_info("%s found\n", brd_name);
if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) {
pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT);