aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/hp-wmi.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-12-24 01:19:00 -0500
committerLen Brown <len.brown@intel.com>2009-12-24 01:19:00 -0500
commitfcb11235d3910c39afece52f6e106a9ca565d34b (patch)
tree07412f9c367f5f9bf6ad7ccd6fa8146c4aba68af /drivers/platform/x86/hp-wmi.c
parent78a5331dddcffabadef024ccc051f7a519b13238 (diff)
parent44ef00e6482e755f36629773abc2aee83a6f53e3 (diff)
Merge branch 'misc-2.6.33' into release
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r--drivers/platform/x86/hp-wmi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 63c3e658a88..8781d8fa7a5 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -134,10 +134,15 @@ static int hp_wmi_perform_query(int query, int write, int value)
obj = output.pointer;
- if (!obj || obj->type != ACPI_TYPE_BUFFER)
+ if (!obj)
return -EINVAL;
+ else if (obj->type != ACPI_TYPE_BUFFER) {
+ kfree(obj);
+ return -EINVAL;
+ }
bios_return = *((struct bios_return *)obj->buffer.pointer);
+ kfree(obj);
if (bios_return.return_code > 0)
return bios_return.return_code * -1;
else
@@ -340,10 +345,12 @@ static void hp_wmi_notify(u32 value, void *context)
if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) {
printk(KERN_INFO "HP WMI: Unknown response received\n");
+ kfree(obj);
return;
}
eventcode = *((u8 *) obj->buffer.pointer);
+ kfree(obj);
if (eventcode == 0x4)
eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0,
0);
@@ -381,6 +388,8 @@ static void hp_wmi_notify(u32 value, void *context)
} else
printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
eventcode);
+
+ kfree(obj);
}
static int __init hp_wmi_input_setup(void)