Re: [PATCH] Remove error prints for devm_add_action_or_reset()
From: Waqar Hameed
Date: Tue Jul 01 2025 - 12:15:38 EST
On Tue, Jul 01, 2025 at 10:16 -0500 David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> 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@xxxxxxxx>
>> ---
> 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.
Thanks for the suggestion David! I will do that then.
(I was contemplating on doing that at first, but gambled on this, since
I saw some other commits patches touching multiple files in different
sub-systems.)