[Bug 218188] hp_wmi_sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -61

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=218188

--- Comment #6 from Armin Wolf (W_Armin@xxxxxx) ---
Can you try this one:

>From ecbb0f5eeab921baf51270e554d432ec09ae9b5c Mon Sep 17 00:00:00 2001
From: Armin Wolf <W_Armin@xxxxxx>
Date: Sat, 25 Nov 2023 16:46:06 +0100
Subject: [PATCH] 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.

Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
---
 drivers/platform/x86/wmi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 5c27b4aa9690..5dd22258cb3b 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1340,6 +1340,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct
platform_device *pdev)
                if (debug_dump_wdg)
                        wmi_dump_wdg(&gblock[i]);

+               if (!gblock[i].instance_count) {
+                       dev_info(wmi_bus_dev, FW_INFO "%pUL has zero
instances\n", &gblock[i].guid);
+                       continue;
+               }
+
                if (guid_already_parsed_for_legacy(device, &gblock[i].guid))
                        continue;

-- 
2.39.2

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux