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 <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Message-ID: <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent 6a422a9 commit a54da9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)