This is a note to let you know that I've just added the patch titled iio: adc: ad4000: Check for error code from devm_mutex_init() call to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-adc-ad4000-check-for-error-code-from-devm_mutex_.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 6d2f7beb521d0c3a9474359c556ce84fe91102fe Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Date: Wed Oct 30 18:19:18 2024 +0200 iio: adc: ad4000: Check for error code from devm_mutex_init() call [ Upstream commit 8ebfd09255219ae55f8a101f6aeb0f64dd780d88 ] Even if it's not critical, the avoidance of checking the error code from devm_mutex_init() call today diminishes the point of using devm variant of it. Tomorrow it may even leak something. Add the missed check. Fixes: 938fd562b974 ("iio: adc: Add support for AD4000") Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Link: https://patch.msgid.link/20241030162013.2100253-2-andriy.shevchenko@xxxxxxxxxxxxxxx Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/iio/adc/ad4000.c b/drivers/iio/adc/ad4000.c index fc9c9807f89d2..b3b82535f5c14 100644 --- a/drivers/iio/adc/ad4000.c +++ b/drivers/iio/adc/ad4000.c @@ -639,7 +639,9 @@ static int ad4000_probe(struct spi_device *spi) indio_dev->name = chip->dev_name; indio_dev->num_channels = 1; - devm_mutex_init(dev, &st->lock); + ret = devm_mutex_init(dev, &st->lock); + if (ret) + return ret; st->gain_milli = 1000; if (chip->has_hardware_gain) {