diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-24 16:00:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-24 16:00:02 -0500 |
commit | 71492fd1bdd4734d8efd20fe00ebf31027d86d3c (patch) | |
tree | d98ce4131c47f0027dded482d25528b9a57f44ac /drivers/platform/x86/hp-wmi.c | |
parent | 45e62974fb110da926e2a6c5b357c15639bdc233 (diff) | |
parent | fcb11235d3910c39afece52f6e106a9ca565d34b (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits)
classmate-laptop: add support for Classmate PC ACPI devices
hp-wmi: Fix two memleaks
acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIAS
dell-wmi: do not keep driver loaded on unsupported boxes
wmi: Free the allocated acpi objects through wmi_get_event_data
drivers/platform/x86/acerhdf.c: check BIOS information whether it begins with string of table
acerhdf: add new BIOS versions
acerhdf: limit modalias matching to supported
toshiba_acpi: convert to seq_file
asus_acpi: convert to seq_file
ACPI: do not select ACPI_DOCK from ATA_ACPI
sony-laptop: enumerate rfkill devices using SN06
sony-laptop: rfkill support for newer models
ACPI: fix OSC regression that caused aer and pciehp not to load
MAINTAINERS: add maintainer for msi-wmi driver
fujitu-laptop: fix tests of acpi_evaluate_integer() return value
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any()
ACPI: processor: remove _PDC object list from struct acpi_processor
ACPI: processor: change acpi_processor_set_pdc() interface
ACPI: processor: open code acpi_processor_cleanup_pdc
...
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 63c3e658a884..8781d8fa7a57 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) | |||
134 | 134 | ||
135 | obj = output.pointer; | 135 | obj = output.pointer; |
136 | 136 | ||
137 | if (!obj || obj->type != ACPI_TYPE_BUFFER) | 137 | if (!obj) |
138 | return -EINVAL; | 138 | return -EINVAL; |
139 | else if (obj->type != ACPI_TYPE_BUFFER) { | ||
140 | kfree(obj); | ||
141 | return -EINVAL; | ||
142 | } | ||
139 | 143 | ||
140 | bios_return = *((struct bios_return *)obj->buffer.pointer); | 144 | bios_return = *((struct bios_return *)obj->buffer.pointer); |
145 | kfree(obj); | ||
141 | if (bios_return.return_code > 0) | 146 | if (bios_return.return_code > 0) |
142 | return bios_return.return_code * -1; | 147 | return bios_return.return_code * -1; |
143 | else | 148 | else |
@@ -340,10 +345,12 @@ static void hp_wmi_notify(u32 value, void *context) | |||
340 | 345 | ||
341 | if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) { | 346 | if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) { |
342 | printk(KERN_INFO "HP WMI: Unknown response received\n"); | 347 | printk(KERN_INFO "HP WMI: Unknown response received\n"); |
348 | kfree(obj); | ||
343 | return; | 349 | return; |
344 | } | 350 | } |
345 | 351 | ||
346 | eventcode = *((u8 *) obj->buffer.pointer); | 352 | eventcode = *((u8 *) obj->buffer.pointer); |
353 | kfree(obj); | ||
347 | if (eventcode == 0x4) | 354 | if (eventcode == 0x4) |
348 | eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0, | 355 | eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0, |
349 | 0); | 356 | 0); |
@@ -381,6 +388,8 @@ static void hp_wmi_notify(u32 value, void *context) | |||
381 | } else | 388 | } else |
382 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", | 389 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", |
383 | eventcode); | 390 | eventcode); |
391 | |||
392 | kfree(obj); | ||
384 | } | 393 | } |
385 | 394 | ||
386 | static int __init hp_wmi_input_setup(void) | 395 | static int __init hp_wmi_input_setup(void) |