Skip to content

Commit a54da9d

Browse files
Wer-Wolfgroeck
authored andcommitted
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: 23902f9 ("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>
1 parent 6a422a9 commit a54da9d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/hwmon/hp-wmi-sensors.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,8 @@ static void hp_wmi_notify(u32 value, void *context)
16371637
goto out_unlock;
16381638

16391639
wobj = out.pointer;
1640+
if (!wobj)
1641+
goto out_unlock;
16401642

16411643
err = populate_event_from_wobj(dev, &event, wobj);
16421644
if (err) {

0 commit comments

Comments
 (0)