mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
hwmon: (hp-wmi-sensors) Check if WMI event data exists
[ Upstream commita54da9df75
] 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:23902f98f8
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ed60aab606
commit
217539e994
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user