[PATCH 6/7] iio: dac: ltc2664: Use devm_mutex_init()

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

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

diff --git a/drivers/iio/dac/ltc2664.c b/drivers/iio/dac/ltc2664.c
index 67f14046cf77..616806615d3d 100644
--- a/drivers/iio/dac/ltc2664.c
+++ b/drivers/iio/dac/ltc2664.c
@@ -675,7 +675,9 @@ static int ltc2664_probe(struct spi_device *spi)

st->chip_info = chip_info;

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

st->regmap = devm_regmap_init_spi(spi, &ltc2664_regmap_config);
if (IS_ERR(st->regmap))
--
2.53.0