summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2024-09-01 05:10:51 +0200
committerGuenter Roeck <linux@roeck-us.net>2024-09-02 07:23:35 -0700
commita54da9df75cd1b4b5028f6c60f9a211532680585 (patch)
treec2e7e25f5d6e923083f94947d82f0fb4d0f1148e /drivers/hwmon
parent6a422a96bc84cf9b9f0ff741f293a1f9059e0883 (diff)
downloadlinux-a54da9df75cd1b4b5028f6c60f9a211532680585.tar.gz
linux-a54da9df75cd1b4b5028f6c60f9a211532680585.tar.bz2
linux-a54da9df75cd1b4b5028f6c60f9a211532680585.zip
hwmon: (hp-wmi-sensors) Check if WMI event data exists
The BIOS can choose to return no event data in response to a WMI event, so the ACPI object passed to the WMI notify handler can be NULL. Check for such a situation and ignore the event in such a case. Fixes: 23902f98f8d4 ("hwmon: add HP WMI Sensors driver") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Message-ID: <20240901031055.3030-2-W_Armin@gmx.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/hp-wmi-sensors.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/hp-wmi-sensors.c b/drivers/hwmon/hp-wmi-sensors.c
index b5325d0e72b9..dfa1d6926dea 100644
--- a/drivers/hwmon/hp-wmi-sensors.c
+++ b/drivers/hwmon/hp-wmi-sensors.c
@@ -1637,6 +1637,8 @@ static void hp_wmi_notify(u32 value, void *context)
goto out_unlock;
wobj = out.pointer;
+ if (!wobj)
+ goto out_unlock;
err = populate_event_from_wobj(dev, &event, wobj);
if (err) {