Re: [PATCH 2/3] thermal: hwmon: Remove redundant OOM message

"Rafael J. Wysocki (Intel)" <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <CAJZ5v0iBTiz=q5Gyrw3tbyq8nQmCkcdP3Y4NA4i_2Qa1Qn2dPQ@mail.gmail.com>
On Wed, Aug 12, 2026 at 6:29 AM <[email protected]> wrote:
>
> From: bui duc phuc <[email protected]>
>
> Remove the dev_warn() after a failed devres_alloc(). This is
> consistent with checkpatch's OOM_MESSAGE convention: no error
> message is needed after a kzalloc()-style allocation failure.
>
> Signed-off-by: bui duc phuc <[email protected]>

Acked-by: Rafael J. Wysocki (Intel) <[email protected]>

and I'm assuming that this will be routed along with the rest of the series.

Thanks!

> ---
>  drivers/thermal/thermal_hwmon.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
> index ec73d03a1e60..747ac87d1c37 100644
> --- a/drivers/thermal/thermal_hwmon.c
> +++ b/drivers/thermal/thermal_hwmon.c
> @@ -269,10 +269,8 @@ int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device
>
>         ptr = devres_alloc(devm_thermal_hwmon_release, sizeof(*ptr),
>                            GFP_KERNEL);
> -       if (!ptr) {
> -               dev_warn(dev, "Failed to allocate device resource data\n");
> +       if (!ptr)
>                 return -ENOMEM;
> -       }
>
>         ret = thermal_add_hwmon_sysfs(tz);
>         if (ret) {
> --
> 2.43.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.