Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: accel: hid: Use iio_push_to_buffers_with_ts() to provide length for runtime checks.

This new function allows us to perform debug checks in the helper to ensure
that the overrun does not occur. For this case, the length being provided
is already passed into the caller function so reuse that.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-12-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+1 -1
+1 -1
drivers/iio/accel/hid-sensor-accel-3d.c
··· 228 228 int len, int64_t timestamp) 229 229 { 230 230 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 231 - iio_push_to_buffers_with_timestamp(indio_dev, data, timestamp); 231 + iio_push_to_buffers_with_ts(indio_dev, data, len, timestamp); 232 232 } 233 233 234 234 /* Callback handler to send event after all samples are received and captured */