Re: [PATCH next] io: proximity: vl53l0x-i2c: Fix error code in probe()

From: Andy Shevchenko
Date: Tue Aug 19 2025 - 06:19:25 EST


On Tue, Aug 19, 2025 at 12:39 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> Commit 65e8202f0322 ("iio: Remove error prints for
> devm_add_action_or_reset()") accidentally introduce a bug where we

introduced

> returned "ret" but the error code was stored in "error" if
> devm_add_action_or_reset() failed. Using two variables to store error
> codes is unnecessary and confusing. Delete the "error" variable and use
> "ret" everywhere instead.

Agree, this is a good catch!
But please, fix the Subject to start with "iio:".

With the above comments being addressed
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>


--
With Best Regards,
Andy Shevchenko