yeah, dicks it.
On Thu, Aug 21, 2025 at 11:53 PM Dixit Parmar <dixitparmar19@gmail.com> 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().
>
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
> ---
> drivers/iio/proximity/ping.c | 4 +---
> drivers/iio/proximity/srf04.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/proximity/ping.c b/drivers/iio/proximity/ping.c
> index c5b4e1378b7d..e3487094d7be 100644
> --- a/drivers/iio/proximity/ping.c
> +++ b/drivers/iio/proximity/ping.c
> @@ -280,10 +280,8 @@ static int ping_probe(struct platform_device *pdev)
> struct iio_dev *indio_dev;
>
> indio_dev = devm_iio_device_alloc(dev, sizeof(struct ping_data));
> - if (!indio_dev) {
> - dev_err(dev, "failed to allocate IIO device\n");
> + if (!indio_dev)
> return -ENOMEM;
> - }
>
> data = iio_priv(indio_dev);
> data->dev = dev;
> diff --git a/drivers/iio/proximity/srf04.c b/drivers/iio/proximity/srf04.c
> index b059bac1078b..f9d32f9aba1f 100644
> --- a/drivers/iio/proximity/srf04.c
> +++ b/drivers/iio/proximity/srf04.c
> @@ -253,10 +253,8 @@ static int srf04_probe(struct platform_device *pdev)
> int ret;
>
> indio_dev = devm_iio_device_alloc(dev, sizeof(struct srf04_data));
> - if (!indio_dev) {
> - dev_err(dev, "failed to allocate IIO device\n");
> + if (!indio_dev)
> return -ENOMEM;
> - }
>
> data = iio_priv(indio_dev);
> data->dev = dev;
>
> --
> 2.43.0
>
>