diff options
author | Linus Torvalds | 2011-03-09 14:04:40 -0800 |
---|---|---|
committer | Linus Torvalds | 2011-03-09 14:04:40 -0800 |
commit | 6b684cd5799cd1e691024ca3a688d1cdec9d4824 (patch) | |
tree | 02fde30c141438b2b7fb96e141fbe5ceb17c4e96 /drivers | |
parent | 1b7e7e6ffc08b3a8fb27bccd8fc740d77758db5b (diff) | |
parent | d406577526a611e6be1f6b1cfeaf094dd95fa439 (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/sbc_fitpc2_wdt.c | 7 |
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); |