2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00

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>
This commit is contained in:
Kelsey Skunberg 2019-07-21 21:11:58 -06:00 committed by Andy Shevchenko
parent 5599e98fe0
commit bad9da86f9

View File

@ -340,9 +340,7 @@ static acpi_status __query_block(struct wmi_block *wblock, u8 instance,
* expensive, but have no corresponding WCxx method. So we
* should not fail if this happens.
*/
if (acpi_has_method(handle, wc_method))
wc_status = acpi_execute_simple_method(handle,
wc_method, 1);
wc_status = acpi_execute_simple_method(handle, wc_method, 1);
}
strcpy(method, "WQ");