From: David Carlier Date: Fri, 10 Apr 2026 19:37:35 +0000 (+0100) Subject: iio: dac: ad5686: Use devm_mutex_init() X-Git-Tag: v7.2-rc1~67^2~5^2~199 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81227f33a84db1448caab226f25f6b9e21bf18ac;p=thirdparty%2Flinux.git iio: dac: ad5686: Use devm_mutex_init() Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES. Signed-off-by: David Carlier Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 4b18498aa0749..9a384c50929bc 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: