Re: [PATCH v2 1/5] hwmon: (hp-wmi-sensors) Check if WMI event data exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 1 Sep 2024, Armin Wolf wrote:

> 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@xxxxxx>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>

-- 
 i.


> ---
>  drivers/hwmon/hp-wmi-sensors.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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) {
> --
> 2.39.2
> 

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux