diff options
author | Kelsey Skunberg <skunberg.kelsey@gmail.com> | 2019-07-21 23:11:58 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-30 07:12:51 -0400 |
commit | bad9da86f9f10a2e68a1574dd34edde6f8556d5f (patch) | |
tree | 82b529258d9d5179e7dcc73ea7e1e07113e4d89a /drivers/platform/x86/wmi.c | |
parent | 5599e98fe06a88db55133ae8ac53f69216b82c6a (diff) |
platform/x86: wmi: Remove acpi_has_method() call
acpi_has_method() is unnecessary within __query_block() and should be
removed to avoid extra work.
wc_status is initialized to AE_ERROR before the acpi_has_method() call.
acpi_has_method() and acpi_execute_simple_method() failing due to the
method not existing will result in the same outcome from __query_block().
Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 784cea8572c2..59e9aa0f9643 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -340,9 +340,7 @@ static acpi_status __query_block(struct wmi_block *wblock, u8 instance, | |||
340 | * expensive, but have no corresponding WCxx method. So we | 340 | * expensive, but have no corresponding WCxx method. So we |
341 | * should not fail if this happens. | 341 | * should not fail if this happens. |
342 | */ | 342 | */ |
343 | if (acpi_has_method(handle, wc_method)) | 343 | wc_status = acpi_execute_simple_method(handle, wc_method, 1); |
344 | wc_status = acpi_execute_simple_method(handle, | ||
345 | wc_method, 1); | ||
346 | } | 344 | } |
347 | 345 | ||
348 | strcpy(method, "WQ"); | 346 | strcpy(method, "WQ"); |