summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/eeepc-wmi.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-06 13:28:30 +0100
committerMatthew Garrett <mjg@redhat.com>2011-03-28 06:05:16 -0400
commit7898cf1a3665d22c4d16308f73e981c6464be81b (patch)
treeaec2a6c98f34ece36b34f18b8cd999bbc7d6359b /drivers/platform/x86/eeepc-wmi.c
parent279f8f95493c9aaa0a85520c863ccba87c4bf930 (diff)
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>
Diffstat (limited to 'drivers/platform/x86/eeepc-wmi.c')
-rw-r--r--drivers/platform/x86/eeepc-wmi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index eb4c0ce88ac1..d8234582b541 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -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)