Commit 4825acc7 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] pcwatchdog firmware memory leak

parent 87536156
...@@ -594,6 +594,7 @@ static void __init pcwd_validate_timeout(void) ...@@ -594,6 +594,7 @@ static void __init pcwd_validate_timeout(void)
static int __init pcwatchdog_init(void) static int __init pcwatchdog_init(void)
{ {
char *firmware;
int i, found = 0; int i, found = 0;
pcwd_validate_timeout(); pcwd_validate_timeout();
spin_lock_init(&io_lock); spin_lock_init(&io_lock);
...@@ -633,10 +634,12 @@ static int __init pcwatchdog_init(void) ...@@ -633,10 +634,12 @@ static int __init pcwatchdog_init(void)
if (revision == PCWD_REVISION_A) if (revision == PCWD_REVISION_A)
printk(KERN_INFO "pcwd: PC Watchdog (REV.A) detected at port 0x%03x\n", current_readport); printk(KERN_INFO "pcwd: PC Watchdog (REV.A) detected at port 0x%03x\n", current_readport);
else if (revision == PCWD_REVISION_C) else if (revision == PCWD_REVISION_C) {
firmware = get_firmware();
printk(KERN_INFO "pcwd: PC Watchdog (REV.C) detected at port 0x%03x (Firmware version: %s)\n", printk(KERN_INFO "pcwd: PC Watchdog (REV.C) detected at port 0x%03x (Firmware version: %s)\n",
current_readport, get_firmware()); current_readport, firmware);
else { kfree(firmware);
} else {
/* Should NEVER happen, unless get_revision() fails. */ /* Should NEVER happen, unless get_revision() fails. */
printk("pcwd: Unable to get revision.\n"); printk("pcwd: Unable to get revision.\n");
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment