Re: [PATCH 1/2] iio: adc: mcp320x: use device managed functions
From: Andy Shevchenko
Date: Thu Aug 25 2022 - 16:02:42 EST
On Wed, Aug 24, 2022 at 1:46 PM Vincent Whitchurch
<vincent.whitchurch@xxxxxxxx> wrote:
>
> Use devm_* functions in probe to remove some code and to make it easier
> to add further calls to the probe function.
...
> + mutex_init(&adc->lock);
> + return devm_iio_device_register(&spi->dev, indio_dev);
Do you still need to destroy the mutex? If so, you may not call devm_
variant of iio_device_register() or you have to wrap mutex_destroy()
accordingly.
--
With Best Regards,
Andy Shevchenko