[PATCH 5/7] iio: dac: ad5686: Use devm_mutex_init()
From: David Carlier
Date: Fri Apr 10 2026 - 15:40:35 EST
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.
Signed-off-by: David Carlier <devnexen@xxxxxxxxx>
---
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