Commit 7898cf1a3665d22c4d16308f73e981c6464be81b

Authored by Corentin Chary
Committed by Matthew Garrett
1 parent 279f8f9549

eeepc-wmi: return proper error code in eeepc_rfkill_set()

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

Showing 1 changed file with 7 additions and 1 deletions Side-by-side Diff

drivers/platform/x86/eeepc-wmi.c
... ... @@ -588,8 +588,14 @@
588 588 {
589 589 int dev_id = (unsigned long)data;
590 590 u32 ctrl_param = !blocked;
  591 + acpi_status status;
591 592  
592   - return eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
  593 + status = eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
  594 +
  595 + if (ACPI_FAILURE(status))
  596 + return -EIO;
  597 +
  598 + return 0;
593 599 }
594 600  
595 601 static void eeepc_rfkill_query(struct rfkill *rfkill, void *data)