iio: health: afe4403: Use devm action helper for regulator disable
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 14:09:15 +0000 (08:09 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:16:09 +0000 (16:16 +0000)
commiteeb4c24a5c909be376675963767fbcd36072fc6a
tree0ccae321ca3ae728ac81e958e80f3b2d64f80f6e
parente21b4321f965d684d1b2d5dfb1ec0d5c3c71892b
iio: health: afe4403: Use devm action helper for regulator disable

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@ti.com>
Link: https://lore.kernel.org/r/20240123140918.215818-1-afd@ti.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/health/afe4403.c