aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/hp-wmi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-01-19 09:53:43 -0500
committerTakashi Iwai <tiwai@suse.de>2010-01-19 09:53:43 -0500
commit9e4c84967ef027fe50a03cf48dd6da9519c8e60c (patch)
tree21d6b8168670f22521f3bb703e3b9d1932566c1c /drivers/platform/x86/hp-wmi.c
parentd2f2fcd2541bae004db7f4798ffd9d2cb75ae817 (diff)
parent3fb4a508b8e7957aa899f32cd6d9d462e102c7ca (diff)
Merge branch 'fix/hda' into topic/hda
Conflicts: sound/pci/hda/patch_realtek.c
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r--drivers/platform/x86/hp-wmi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 8781d8fa7a57..ad4c414dbfbc 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -338,8 +338,13 @@ static void hp_wmi_notify(u32 value, void *context)
338 static struct key_entry *key; 338 static struct key_entry *key;
339 union acpi_object *obj; 339 union acpi_object *obj;
340 int eventcode; 340 int eventcode;
341 acpi_status status;
341 342
342 wmi_get_event_data(value, &response); 343 status = wmi_get_event_data(value, &response);
344 if (status != AE_OK) {
345 printk(KERN_INFO "hp-wmi: bad event status 0x%x\n", status);
346 return;
347 }
343 348
344 obj = (union acpi_object *)response.pointer; 349 obj = (union acpi_object *)response.pointer;
345 350
@@ -388,8 +393,6 @@ static void hp_wmi_notify(u32 value, void *context)
388 } else 393 } else
389 printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", 394 printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
390 eventcode); 395 eventcode);
391
392 kfree(obj);
393} 396}
394 397
395static int __init hp_wmi_input_setup(void) 398static int __init hp_wmi_input_setup(void)
@@ -581,7 +584,7 @@ static int __init hp_wmi_init(void)
581 if (wmi_has_guid(HPWMI_EVENT_GUID)) { 584 if (wmi_has_guid(HPWMI_EVENT_GUID)) {
582 err = wmi_install_notify_handler(HPWMI_EVENT_GUID, 585 err = wmi_install_notify_handler(HPWMI_EVENT_GUID,
583 hp_wmi_notify, NULL); 586 hp_wmi_notify, NULL);
584 if (!err) 587 if (ACPI_SUCCESS(err))
585 hp_wmi_input_setup(); 588 hp_wmi_input_setup();
586 } 589 }
587 590