Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-wat…
Browse files Browse the repository at this point in the history
…chdog

* 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
  • Loading branch information
Linus Torvalds committed Mar 9, 2011
2 parents 1b7e7e6 + d406577 commit 6b684cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/watchdog/sbc_fitpc2_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b684cd

Please sign in to comment.