[PATCH] Remove error prints for devm_add_action_or_reset()
David Lechner
dlechner at baylibre.com
Tue Jul 1 08:16:47 PDT 2025
On 7/1/25 10:03 AM, Waqar Hameed 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.
>
> Signed-off-by: Waqar Hameed <waqar.hameed at axis.com>
> ---
I can't speak for all subsystems, but this would probably be acceptable
in the iio subsystem.
However, I don't think anyone is going to accept a patch that touches
all of these files at the same time across subsystems.
So I would suggest to split this up into one patch per driver and create
one series per subsystem. This way, each subsystem isn't bothered by unrelated
patches that they don't particularly need to care about. And note that some
subsystems like net have additional expectations, e.g for the patch subject
so that it gets picked up by automated tools, so be sure to check the docs
for this.
More information about the linux-phy
mailing list