[PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM

Xichao Zhao posted 7 patches 1 month, 1 week ago
drivers/iio/accel/msa311.c           | 8 +++-----
drivers/iio/adc/hx711.c              | 2 +-
drivers/iio/adc/imx93_adc.c          | 3 +--
drivers/iio/adc/mcp3564.c            | 2 +-
drivers/iio/adc/meson_saradc.c       | 2 +-
drivers/iio/adc/rockchip_saradc.c    | 3 +--
drivers/iio/adc/spear_adc.c          | 3 +--
drivers/iio/adc/ti-ads1119.c         | 6 ++----
drivers/iio/adc/ti-ads7924.c         | 3 +--
drivers/iio/adc/vf610_adc.c          | 2 +-
drivers/iio/chemical/ens160_core.c   | 3 +--
drivers/iio/chemical/scd30_core.c    | 2 +-
drivers/iio/imu/bmi323/bmi323_core.c | 3 +--
drivers/iio/light/opt4060.c          | 2 +-
drivers/iio/light/veml6040.c         | 3 +--
drivers/iio/proximity/d3323aa.c      | 3 +--
drivers/iio/proximity/hx9023s.c      | 3 +--
drivers/iio/proximity/irsd200.c      | 6 ++----
drivers/iio/temperature/mlx90635.c   | 2 +-
19 files changed, 23 insertions(+), 38 deletions(-)
[PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM
Posted by Xichao Zhao 1 month, 1 week ago
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Xichao Zhao (7):
  iio: accel: msa311: Remove dev_err_probe() if error is -ENOMEM
  iio: adc: Remove dev_err_probe() if error is -ENOMEM
  iio: chemical: Remove dev_err_probe() if error is -ENOMEM
  iio: imu: bmi323: Remove dev_err_probe() if error is -ENOMEM
  iio: light: Remove dev_err_probe() if error is -ENOMEM
  iio: proximity: Remove dev_err_probe() if error is -ENOMEM
  iio: temperature: mlx90635: Remove dev_err_probe() if error is -ENOMEM

 drivers/iio/accel/msa311.c           | 8 +++-----
 drivers/iio/adc/hx711.c              | 2 +-
 drivers/iio/adc/imx93_adc.c          | 3 +--
 drivers/iio/adc/mcp3564.c            | 2 +-
 drivers/iio/adc/meson_saradc.c       | 2 +-
 drivers/iio/adc/rockchip_saradc.c    | 3 +--
 drivers/iio/adc/spear_adc.c          | 3 +--
 drivers/iio/adc/ti-ads1119.c         | 6 ++----
 drivers/iio/adc/ti-ads7924.c         | 3 +--
 drivers/iio/adc/vf610_adc.c          | 2 +-
 drivers/iio/chemical/ens160_core.c   | 3 +--
 drivers/iio/chemical/scd30_core.c    | 2 +-
 drivers/iio/imu/bmi323/bmi323_core.c | 3 +--
 drivers/iio/light/opt4060.c          | 2 +-
 drivers/iio/light/veml6040.c         | 3 +--
 drivers/iio/proximity/d3323aa.c      | 3 +--
 drivers/iio/proximity/hx9023s.c      | 3 +--
 drivers/iio/proximity/irsd200.c      | 6 ++----
 drivers/iio/temperature/mlx90635.c   | 2 +-
 19 files changed, 23 insertions(+), 38 deletions(-)

-- 
2.34.1
Re: [PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM
Posted by Andy Shevchenko 1 month, 1 week ago
On Thu, Aug 21, 2025 at 11:07 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
>
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.

when the error

> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.

In favour of this series,
Reviewed-by: Andy Shevchenko <andy@kernel.org>
(yes, I indeed looked at all patches in this one :-)

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM
Posted by Jonathan Cameron 1 month, 1 week ago
On Thu, 21 Aug 2025 11:13:00 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Thu, Aug 21, 2025 at 11:07 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
> >
> > The dev_err_probe() doesn't do anything when error is '-ENOMEM'.  
> 
> when the error
> 
Tweaked and applied.

> > Therefore, remove the useless call to dev_err_probe(), and just
> > return the value instead.  
> 
> In favour of this series,
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
> (yes, I indeed looked at all patches in this one :-)
> 
Re: [PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM
Posted by Crt Mori 1 month, 1 week ago
Sorry duplicate - as I commented on driver.

On Thu, 21 Aug 2025 at 10:13, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> On Thu, Aug 21, 2025 at 11:07 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
> >
> > The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
>
> when the error
>
> > Therefore, remove the useless call to dev_err_probe(), and just
> > return the value instead.
>
> In favour of this series,
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
> (yes, I indeed looked at all patches in this one :-)
>
I am not sure I agree with this. It provides an error message with
reason and I understand we want as few as possible, but this would be
a valid remark inside the logs, but without it we only get error value
to figure out where it comes from?

> --
> With Best Regards,
> Andy Shevchenko
Re: [PATCH 0/7] iio: Remove dev_err_probe() if error is -ENOMEM
Posted by Andy Shevchenko 1 month, 1 week ago
On Thu, Aug 21, 2025 at 2:50 PM Crt Mori <cmo@melexis.com> wrote:
>
> Sorry duplicate - as I commented on driver.

Yep, answered there.


-- 
With Best Regards,
Andy Shevchenko