iio: accel: adxl367: unlock on error in adxl367_buffer_predisable()
Subsystems (4)
PATCH 1/1 iio: accel: adxl367: unlock on error in adxl367_buffer_predisable()
This error path needs to call the mutex_unlock(&st->lock) before returning.
Fixes cbab791c5e2a ("iio: accel: add ADXL367 driver")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/iio/accel/adxl367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/adxl367.c +1 -1
@@ -1359,7 +1359,7 @@ static int adxl367_buffer_predisable(struct iio_dev *indio_dev) ret =adxl367_set_measure_en (st, true);if (ret) -return ret; + goto out; ret =adxl367_set_temp_adc_mask_en (st, indio_dev->active_scan_mask, false);
Signature · 1 line
2.20.1
Quoted 5 lines · On Thu, 24 Feb 2022 18:02:28 +0300 Dan Carpenter <[email protected]>…
This error path needs to call the
mutex_unlock(&st->lock)before returning.Fixes cbab791c5e2a ("iio: accel: add ADXL367 driver")Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied to the togreg branch of iio.git.
Jonathan
Quoted 17 lines
--- drivers/iio/accel/adxl367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/adxl367.c +1
-1@@ -1359,7 +1359,7 @@ static int adxl367_buffer_predisable(struct iio_dev *indio_dev) ret =adxl367_set_measure_en (st, true);if (ret) -return ret; + goto out; ret =adxl367_set_temp_adc_mask_en (st, indio_dev->active_scan_mask, false);