[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c474bfef-a4d4-f1f5-463d-04ed6f69818e@linux.intel.com>
Date: Mon, 2 Sep 2024 17:09:26 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Armin Wolf <W_Armin@....de>
cc: james@...iv.tech, jlee@...e.com, corentin.chary@...il.com, luke@...nes.dev,
matan@...alib.org, coproscefalo@...il.com,
Hans de Goede <hdegoede@...hat.com>, linux@...ck-us.net, jdelvare@...e.com,
"Rafael J. Wysocki" <rafael@...nel.org>, lenb@...nel.org,
platform-driver-x86@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-acpi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/5] hwmon: (hp-wmi-sensors) Check if WMI event data
exists
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@....de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
--
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
>
Powered by blists - more mailing lists