diff options
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 916ccb2b316c..1b1dddbd5744 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
@@ -202,8 +202,13 @@ static void dell_wmi_notify(u32 value, void *context) | |||
202 | struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL }; | 202 | struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL }; |
203 | static struct key_entry *key; | 203 | static struct key_entry *key; |
204 | union acpi_object *obj; | 204 | union acpi_object *obj; |
205 | acpi_status status; | ||
205 | 206 | ||
206 | wmi_get_event_data(value, &response); | 207 | status = wmi_get_event_data(value, &response); |
208 | if (status != AE_OK) { | ||
209 | printk(KERN_INFO "dell-wmi: bad event status 0x%x\n", status); | ||
210 | return; | ||
211 | } | ||
207 | 212 | ||
208 | obj = (union acpi_object *)response.pointer; | 213 | obj = (union acpi_object *)response.pointer; |
209 | 214 | ||
@@ -323,8 +328,9 @@ static int __init dell_wmi_input_setup(void) | |||
323 | static int __init dell_wmi_init(void) | 328 | static int __init dell_wmi_init(void) |
324 | { | 329 | { |
325 | int err; | 330 | int err; |
331 | acpi_status status; | ||
326 | 332 | ||
327 | if (wmi_has_guid(DELL_EVENT_GUID)) { | 333 | if (!wmi_has_guid(DELL_EVENT_GUID)) { |
328 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); | 334 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); |
329 | return -ENODEV; | 335 | return -ENODEV; |
330 | } | 336 | } |
@@ -336,14 +342,14 @@ static int __init dell_wmi_init(void) | |||
336 | if (err) | 342 | if (err) |
337 | return err; | 343 | return err; |
338 | 344 | ||
339 | err = wmi_install_notify_handler(DELL_EVENT_GUID, | 345 | status = wmi_install_notify_handler(DELL_EVENT_GUID, |
340 | dell_wmi_notify, NULL); | 346 | dell_wmi_notify, NULL); |
341 | if (err) { | 347 | if (ACPI_FAILURE(status)) { |
342 | input_unregister_device(dell_wmi_input_dev); | 348 | input_unregister_device(dell_wmi_input_dev); |
343 | printk(KERN_ERR | 349 | printk(KERN_ERR |
344 | "dell-wmi: Unable to register notify handler - %d\n", | 350 | "dell-wmi: Unable to register notify handler - %d\n", |
345 | err); | 351 | status); |
346 | return err; | 352 | return -ENODEV; |
347 | } | 353 | } |
348 | 354 | ||
349 | return 0; | 355 | return 0; |