Skip to content

Commit

Permalink
eeepc-wmi: return proper error code in eeepc_rfkill_set()
Browse files Browse the repository at this point in the history
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Mar 28, 2011
1 parent 279f8f9 commit 7898cf1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/platform/x86/eeepc-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7898cf1

Please sign in to comment.