]> git.hungrycats.org Git - linux/commit
iio: imu: inv_mpu6050: fix FIFO parsing when empty
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Mon, 19 Feb 2024 15:48:25 +0000 (15:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:11:41 +0000 (15:11 +0200)
commita4258f4b7130f86407d3decc4fc6a20ead4048b2
tree91a07dd70a1e09ba25a0d87bb7e433da288aedb6
parentfcb214c95ee817ccaf2e03842e60d66bf6f1afb3
iio: imu: inv_mpu6050: fix FIFO parsing when empty

commit 60caa8b33bd682a9ed99d1fc3f91d74e1acc9922 upstream.

Now that we are reading the full FIFO in the interrupt handler,
it is possible to have an emply FIFO since we are still receiving
1 interrupt per data. Handle correctly this case instead of having
an error causing a reset of the FIFO.

Fixes: 0829edc43e0a ("iio: imu: inv_mpu6050: read the full fifo when processing data")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240219154825.90656-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c