platform/x86: wmi: do not fail if disabling fails
authorBarnabás Pőcze <pobrn@protonmail.com>
Sat, 4 Sep 2021 17:56:26 +0000 (17:56 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 14 Sep 2021 10:26:02 +0000 (12:26 +0200)
commit1975718c488a39128f1f515b23ae61a5a214cc3d
treee84bc4d9ed9b6673121202b39a7a16ded5d9429e
parent1c23ab912810f7d204c2f5873b3b8eaa05da7815
platform/x86: wmi: do not fail if disabling fails

Previously, `__query_block()` would fail if the
second WCxx method call failed. However, the
WQxx method might have succeeded, and potentially
allocated memory for the result. Instead of
throwing away the result and potentially
leaking memory, ignore the result of
the second WCxx call.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210904175450.156801-25-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c