platform/x86: wmi: Skip blocks with zero instances
authorArmin Wolf <W_Armin@gmx.de>
Wed, 29 Nov 2023 18:16:54 +0000 (19:16 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 30 Nov 2023 11:53:50 +0000 (13:53 +0200)
commitcbf54f37600e874d82886aa3b2f471778cae01ce
tree289c87480d5a70b15fad62eee6ec60b08c81596a
parentc8820c92caf0770bec976b01fa9e82bb993c5865
platform/x86: wmi: Skip blocks with zero instances

Some machines like the HP Omen 17 ck2000nf contain WMI blocks
with zero instances, so any WMI driver which tries to handle the
associated WMI device will fail.
Skip such WMI blocks to avoid confusing any WMI drivers.

Reported-by: Alexis Belmonte <alexbelm48@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188
Fixes: bff431e49ff5 ("ACPI: WMI: Add ACPI-WMI mapping driver")
Tested-by: Alexis Belmonte <alexbelm48@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231129181654.5800-1-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/wmi.c