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>
This commit is contained in:
committed by
Matthew Garrett
parent
279f8f9549
commit
7898cf1a36
@@ -588,8 +588,14 @@ static int eeepc_rfkill_set(void *data, bool blocked)
|
|||||||
{
|
{
|
||||||
int dev_id = (unsigned long)data;
|
int dev_id = (unsigned long)data;
|
||||||
u32 ctrl_param = !blocked;
|
u32 ctrl_param = !blocked;
|
||||||
|
acpi_status status;
|
||||||
|
|
||||||
return eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
|
status = eeepc_wmi_set_devstate(dev_id, ctrl_param, NULL);
|
||||||
|
|
||||||
|
if (ACPI_FAILURE(status))
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eeepc_rfkill_query(struct rfkill *rfkill, void *data)
|
static void eeepc_rfkill_query(struct rfkill *rfkill, void *data)
|
||||||
|
Reference in New Issue
Block a user