Patch "iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()
to the 4.15-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-meson-saradc-unlock-on-error-in-meson_sar_adc_lock.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
3c3e4b3a708a9d6451052e348981f37d2b3e92b0Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Thu, 8 Mar 2018 12:31:53 +0300
Subject: iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()
From: Dan Carpenter <[email protected]>
commit 3c3e4b3a708a9d6451052e348981f37d2b3e92b0 upstream.
The meson_sar_adc_lock() function is not supposed to hold the "indio_dev->mlock" on the error path.
--- drivers/iio/adc/meson_saradc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/adc/meson_saradc.c +3 -1
@@ -462,8 +462,10 @@ static int meson_sar_adc_lock(struct iioregmap_read (priv->regmap,MESON_SAR_ADC_DELAY , &val); }while (val &MESON_SAR_ADC_DELAY_BL30_BUSY && timeout--); -if (timeout <0 ) +if (timeout <0 ) { +mutex_unlock (&indio_dev->mlock);return -ETIMEDOUT ; + } }return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/iio-adc-meson-saradc-unlock-on-error-in-meson_sar_adc_lock.patch