[PATCH 1/7] iio: dac: ad3552r: Use devm_mutex_init()

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

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

diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
index 93c33bc3e1be..a2713b0c176e 100644
--- a/drivers/iio/dac/ad3552r.c
+++ b/drivers/iio/dac/ad3552r.c
@@ -629,7 +629,9 @@ static int ad3552r_probe(struct spi_device *spi)
if (!dac->model_data)
return -EINVAL;

- mutex_init(&dac->lock);
+ err = devm_mutex_init(&spi->dev, &dac->lock);
+ if (err)
+ return err;

err = ad3552r_init(dac);
if (err)
--
2.53.0