Re: [PATCH] Remove error prints for devm_add_action_or_reset()

Waqar Hameed
2025-07-01T16:15:55Z

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

> [Some people who received this message don't often get email from geraldogabriel@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).