diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-01-12 07:40:50 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 07:40:50 -0300 |
commit | 712fcc850e5a6d0867b0d97a0b79f1addd01998f (patch) | |
tree | d092452bebc70059ffa9f913a1daea74d656300e /drivers/platform/x86/wmi.c | |
parent | e99f775ed2f46b225106f0a156116a0080d16740 (diff) | |
parent | 0156d956a951c70743d2338132662b29aeb8847d (diff) |
Merge pull request #517 from denisdrozdov/5.4-2.3.x-imx
Merge tag 'v5.4.161' into 5.4-2.3.x-imx
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 59e9aa0f9643..cb029126a68c 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -353,7 +353,14 @@ static acpi_status __query_block(struct wmi_block *wblock, u8 instance, * the WQxx method failed - we should disable collection anyway. */ if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { - status = acpi_execute_simple_method(handle, wc_method, 0); + /* + * Ignore whether this WCxx call succeeds or not since + * the previously executed WQxx method call might have + * succeeded, and returning the failing status code + * of this call would throw away the result of the WQxx + * call, potentially leaking memory. + */ + acpi_execute_simple_method(handle, wc_method, 0); } return status; |