summaryrefslogtreecommitdiff
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-02-24 18:02:28 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-26 18:06:08 +0000
commit7948d301c24887a27ff560ca91f8b4cf4cd8e0c8 (patch)
treeca14b8b45aba4a98f849ae0168731df6c6690883 /drivers/iio/accel
parent2c43265516b5a507a2bc646453aafea8aaa304e7 (diff)
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 <dan.carpenter@oracle.com> Reviewed-by: Cosmin Tanislav <cosmin.tanislav@analog.com> Link: https://lore.kernel.org/r/20220224150228.GB6856@kili Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/adxl367.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c
index b452d74b1d4d..bdc95409abed 100644
--- a/drivers/iio/accel/adxl367.c
+++ b/drivers/iio/accel/adxl367.c
@@ -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);