Commit 7948d301 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio: accel: adxl367: unlock on error in adxl367_buffer_predisable()

This error path needs to call the mutex_unlock(&st->lock) before
returning.

Fixes: cbab791c ("iio: accel: add ADXL367 driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220224150228.GB6856@kiliSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2c432655
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment