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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:09 +0000 (19:16 +0100)
commit36bd10013bdfbc34c35b6eac998323168d97f474
tree8d275c1422ef886cf3a08f576d14924c4199c822
parent9508ee70d138a11895f6308b1db69ed06fb4ebc4
platform/x86: wmi: do not fail if disabling fails

[ Upstream commit 1975718c488a39128f1f515b23ae61a5a214cc3d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/wmi.c