On Thu, Apr 29, 2021 at 3:28 PM Sean Nyekjaer <sean@xxxxxxxxxx> wrote: > > When buffered sampling is enabled, the accelerometer will dump data into > the internal fifo and interrupt at watermark. Then the driver flushes > all data to the iio buffer. > As the accelerometer doesn't have internal timestamps, they are approximated > between the current and last interrupt. ... > + int ret = 0; Redundant assignment. > + fxls8962af_standby(data); > + > + /* Disable buffer interrupt*/ > + ret = regmap_update_bits(data->regmap, FXLS8962AF_INT_EN, > + FXLS8962AF_INT_EN_BUF_EN, 0); > + if (ret < 0) > + return ret; ... > + if (reg & FXLS8962AF_BUF_STATUS_BUF_OVF) { > + dev_err(dev, "Buffer overflown"); overflow > + return -1; Proper error code, please. > + } ... > + count = reg & FXLS8962AF_BUF_STATUS_BUF_CNT; > + Redundant blank line. > + if (!count) > + return 0; -- With Best Regards, Andy Shevchenko