[PATCH v2] iio: Remove error prints for devm_add_action_or_reset()
Jonathan Cameron
jic23 at kernel.org
Sat Aug 9 13:00:01 PDT 2025
On Tue, 5 Aug 2025 15:06:02 +0200
Andy Shevchenko <andy.shevchenko at gmail.com> wrote:
> On Tue, Aug 5, 2025 at 11:33 AM Waqar Hameed <waqar.hameed at axis.com> wrote:
> >
> > When `devm_add_action_or_reset()` fails, it is due to a failed memory
> > allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
> > anything when error is `-ENOMEM`. Therefore, remove the useless call to
> > `dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
> > return the value instead.
>
> Even more, the devm has tracepoints in case somebody really wants to
> investigate failures.
>
> Fully in support of this change.
> Reviewed-by: Andy Shevchenko <andy at kernel.org>
>
Applied to the testing branch of iio.git. I'll rebase that
on rc1 once available.
Jonathan
More information about the linux-arm-kernel
mailing list