mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
iio: accel: adxl313: add missing error check in predisable
Check the return value of the FIFO bypass regmap_write() before
proceeding to disable interrupts.
Fixes: ff8093fa6b ("iio: accel: adxl313: add buffered FIFO watermark with interrupt handling")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
c354521708
commit
9d3fa23d5d
@@ -998,6 +998,8 @@ static int adxl313_buffer_predisable(struct iio_dev *indio_dev)
|
||||
|
||||
ret = regmap_write(data->regmap, ADXL313_REG_FIFO_CTL,
|
||||
FIELD_PREP(ADXL313_REG_FIFO_CTL_MODE_MSK, ADXL313_FIFO_BYPASS));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = regmap_write(data->regmap, ADXL313_REG_INT_ENABLE, 0);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user