From: Nuno Sá Date: Tue, 4 Nov 2025 15:35:13 +0000 (+0000) Subject: iio: dac: ad5446: Make use of devm_mutex_init() X-Git-Tag: v6.19-rc1~65^2~58^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e43c10675d876a5fb71e57a9bcca9533fccccd9;p=thirdparty%2Flinux.git iio: dac: ad5446: Make use of devm_mutex_init() Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c index c7876217c7ecf..59e1f67ef3342 100644 --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c @@ -184,7 +184,9 @@ int ad5446_probe(struct device *dev, const char *name, indio_dev->channels = &st->chip_info->channel; indio_dev->num_channels = 1; - mutex_init(&st->lock); + ret = devm_mutex_init(dev, &st->lock); + if (ret) + return ret; st->pwr_down_mode = MODE_PWRDWN_1k;