]> www.infradead.org Git - users/willy/xarray.git/commit
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
authorSilvano Seva <s.seva@4sigma.it>
Tue, 11 Mar 2025 08:49:47 +0000 (09:49 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 7 Apr 2025 18:32:49 +0000 (19:32 +0100)
commit159ca7f18129834b6f4c7eae67de48e96c752fc9
tree1d45d819f93c30be661d59521394581d2af515c0
parent38f67d0264929762e54ae5948703a21f841fe706
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo

Prevent st_lsm6dsx_read_fifo from falling in an infinite loop in case
pattern_len is equal to zero and the device FIFO is not empty.

Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: Silvano Seva <s.seva@4sigma.it>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250311085030.3593-2-s.seva@4sigma.it
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c