From: Corentin Chary Date: Sun, 6 Feb 2011 12:28:30 +0000 (+0100) Subject: eeepc-wmi: return proper error code in eeepc_rfkill_set() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7898cf1a3665d22c4d16308f73e981c6464be81b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git eeepc-wmi: return proper error code in eeepc_rfkill_set() Signed-off-by: Corentin Chary Signed-off-by: Matthew Garrett --- 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)