]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/platform/x86/hp-wmi.c
dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return value
[net-next-2.6.git] / drivers / platform / x86 / hp-wmi.c
index 18bf74136d2412af583a5dc7ca9e1a0188bfb25b..5b648f0c6075411464842ae29f70912cfd1aa658 100644 (file)
@@ -338,8 +338,13 @@ static void hp_wmi_notify(u32 value, void *context)
        static struct key_entry *key;
        union acpi_object *obj;
        int eventcode;
+       acpi_status status;
 
-       wmi_get_event_data(value, &response);
+       status = wmi_get_event_data(value, &response);
+       if (status != AE_OK) {
+               printk(KERN_INFO "hp-wmi: bad event status 0x%x\n", status);
+               return;
+       }
 
        obj = (union acpi_object *)response.pointer;