eeepc-wmi: return proper error code in eeepc_rfkill_set()
authorCorentin Chary <corentincj@iksaif.net>
Sun, 6 Feb 2011 12:28:30 +0000 (13:28 +0100)
committerMatthew Garrett <mjg@redhat.com>
Mon, 28 Mar 2011 10:05:16 +0000 (06:05 -0400)
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/eeepc-wmi.c

index eb4c0ce88ac1c3fffdf1dedc2af0e532c6f62d81..d8234582b5419cb48a605c60e9abd666f9e6523b 100644 (file)
@@ -588,8 +588,14 @@ static int eeepc_rfkill_set(void *data, bool blocked)
 {
        int dev_id = (unsigned long)data;
        u32 ctrl_param = !blocked;
+       acpi_status status;
+
+       status = eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
+
+       if (ACPI_FAILURE(status))
+               return -EIO;
 
-       return eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
+       return 0;
 }
 
 static void eeepc_rfkill_query(struct rfkill *rfkill, void *data)