]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/platform/x86/hp-wmi.c
dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return value
[karo-tx-linux.git] / drivers / platform / x86 / hp-wmi.c
index 36109e19f3498daa00adb2d56d5e9dfa8cd4880e..deb53b55a41fe64c9e8c69eaea0f729c357b0292 100644 (file)
@@ -334,8 +334,13 @@ static void hp_wmi_notify(u32 value, void *context)
        struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL };
        static struct key_entry *key;
        union acpi_object *obj;
+       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;