Skip to content

Commit cbf54f3

Browse files
Wer-Wolfij-intel
authored andcommitted
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 <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188 Fixes: bff431e ("ACPI: WMI: Add ACPI-WMI mapping driver") Tested-by: Alexis Belmonte <[email protected]> Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent c8820c9 commit cbf54f3

File tree

1 file changed

+5
-0
lines changed
  • drivers/platform/x86

1 file changed

+5
-0
lines changed

drivers/platform/x86/wmi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
13401340
if (debug_dump_wdg)
13411341
wmi_dump_wdg(&gblock[i]);
13421342

1343+
if (!gblock[i].instance_count) {
1344+
dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid);
1345+
continue;
1346+
}
1347+
13431348
if (guid_already_parsed_for_legacy(device, &gblock[i].guid))
13441349
continue;
13451350

0 commit comments

Comments
 (0)