[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeGvgv6TAYRRtEySmESkjygW79ms-Yd64h08_+7JjJMJw@mail.gmail.com>
Date: Tue, 5 Aug 2025 15:06:02 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Waqar Hameed <waqar.hameed@...s.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Cosmin Tanislav <cosmin.tanislav@...log.com>,
Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Matteo Martelli <matteomartelli3@...il.com>, Heiko Stuebner <heiko@...ech.de>,
Francesco Dolcini <francesco@...cini.it>,
João Paulo Gonçalves <jpaulo.silvagoncalves@...il.com>,
Hugo Villeneuve <hvilleneuve@...onoff.com>, Subhajit Ghosh <subhajit.ghosh@...aklogic.com>,
Mudit Sharma <muditsharma.info@...il.com>, Gerald Loacker <gerald.loacker@...fvision.net>,
Song Qiang <songqiang1304521@...il.com>, Crt Mori <cmo@...exis.com>, kernel@...s.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v2] iio: Remove error prints for devm_add_action_or_reset()
On Tue, Aug 5, 2025 at 11:33 AM Waqar Hameed <waqar.hameed@...s.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@...nel.org>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists