Skip to content

Commit

Permalink
hwmon: (hp-wmi-sensors) Check if WMI event data exists
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Armin Wolf authored and Guenter Roeck committed Sep 2, 2024
1 parent 6a422a9 commit a54da9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/hwmon/hp-wmi-sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a54da9d

Please sign in to comment.