[PATCH 5/7] iio: dac: ad5686: Use devm_mutex_init()

David Carlier
2026-04-10T19:37:50Z

drivers/iio/dac/ad5686.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index 4b18498aa074..9a384c50929b 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -494,7 +494,9 @@ int ad5686_probe(struct device *dev,
indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels;

- mutex_init(&st->lock);
+ ret = devm_mutex_init(dev, &st->lock);
+ if (ret)
+ return ret;

switch (st->chip_info->regmap_type) {
case AD5310_REGMAP:
--
2.53.0