[PATCH 02/10] iio: adc: Drop unnecessary -ENOMEM messages

Andy Shevchenko andriy.shevchenko at intel.com
Fri Aug 22 02:41:18 PDT 2025


On Fri, Aug 22, 2025 at 09:19:50AM +0530, Dixit Parmar wrote:
> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().

...

>  	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*ddata));
> -	if (!indio_dev) {
> -		dev_err(&pdev->dev, "failed to allocate iio device\n");
> -
> +	if (!indio_dev)
>  		return -ENOMEM;
> -	}
> +
>  	ddata = iio_priv(indio_dev);
>  	ddata->ato = device_get_match_data(&pdev->dev);
>  	if (!ddata->ato)

Looking at this hunk I'm wondering if you are using --histogram diff algo when
preparing patches. If not, please do for the next version.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list