Re: [PATCH 2/3] thermal: hwmon: Remove redundant OOM message
From: Rafael J. Wysocki (Intel)
Date: Thu Aug 20 2026 - 17:23:31 EST
On Wed, Aug 12, 2026 at 6:29 AM <phucduc.bui@xxxxxxxxx> wrote:
>
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> 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 <phucduc.bui@xxxxxxxxx>
Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
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
>