Re: [PATCH 1/4] iio: health: afe4403: Use devm action helper for regulator disable

From: Jonathan Cameron
Date: Sat Jan 27 2024 - 10:48:57 EST


On Tue, 23 Jan 2024 08:09:15 -0600
Andrew Davis <afd@xxxxxx> wrote:

> Use a device lifecycle managed action for regulator disable function.
> This helps prevent mistakes like unregistering out of order in cleanup
> functions and forgetting to unregister on error paths.
>
> Signed-off-by: Andrew Davis <afd@xxxxxx>
Hi Andrew,

All applied.

You could make use of dev_err_probe() as well to save a few lines if
you want to (as a follow up patch).

Thanks,

Jonathan