[PATCH 7/7] iio: addac: ad74115: Use devm_mutex_init()

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

drivers/iio/addac/ad74115.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/addac/ad74115.c b/drivers/iio/addac/ad74115.c
index f8b04d86b01f..41e0b1d334cc 100644
--- a/drivers/iio/addac/ad74115.c
+++ b/drivers/iio/addac/ad74115.c
@@ -1835,7 +1835,10 @@ static int ad74115_probe(struct spi_device *spi)
st = iio_priv(indio_dev);

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

indio_dev->name = AD74115_NAME;
--
2.53.0