platform/x86: acer-wmi: Improve error handling when reading gaming system information
authorArmin Wolf <W_Armin@gmx.de>
Tue, 10 Dec 2024 00:16:55 +0000 (01:16 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 10 Dec 2024 14:40:31 +0000 (16:40 +0200)
commita11d8b37942d3c12a8a5f8ae30cbdeb069e5d819
treea6762891e2821fb693950f79896fb09d1293c41b
parent287b3240fc8a06a14923019a6b3e697c6e693c93
platform/x86: acer-wmi: Improve error handling when reading gaming system information

If a call to ACER_WMID_GET_GAMING_SYS_INFO_METHODID fails, the lower
8 bits will be non-zero. Introduce a helper function to check this and
use it when reading gaming system information.

Tested-by: Rayan Margham <rayanmargham4@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20241210001657.3362-4-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/acer-wmi.c