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

Daniel Lezcano <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <[email protected]>
On 8/12/26 06:28, [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]>
> ---
>   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;
> -	}
Acked-by: Daniel Lezcano <[email protected]>
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.