iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Mar 2018 09:31:53 +0000 (12:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 16:24:29 +0000 (18:24 +0200)
commit2b706310e520243a083ed60b2005aef663e88873
tree4da543bd6473e83844b4f0c45ada1d84a960036f
parentd1138478e071c91fb676119dcc686dc4957637ae
iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()

commit 3c3e4b3a708a9d6451052e348981f37d2b3e92b0 upstream.

The meson_sar_adc_lock() function is not supposed to hold the
"indio_dev->mlock" on the error path.

Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/meson_saradc.c