[PATCH] Remove error prints for devm_add_action_or_reset()

Waqar Hameed waqar.hameed at axis.com
Tue Jul 1 09:15:51 PDT 2025


On Tue, Jul 01, 2025 at 12:25 -0300 Geraldo Nascimento <geraldogabriel at gmail.com> wrote:

> [Some people who received this message don't often get email from geraldogabriel at gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Tue, Jul 01, 2025 at 05:03:33PM +0200, 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.
>
> Hi Waqar,
>
> thank you for the patch. However I personally advise you to split the
> patches per-file and remember to then precede each individual patch
> subject with the proper subsystem and driver touched.
>
> While this looks like a nit-pick, it really isn't, and my suggestion
> will make reviewing much more easier and you'll get your Reviewed-by's
> and Acked-by's much more smoothly.
>
> The cover-letter should probably be preceded by "treewide" instead of
> a specific subsystem.

Thank you for the suggestion Geraldo! I will do that (as also answered
to David).



More information about the linux-amlogic mailing list