diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-04-13 11:34:38 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-05-21 14:20:26 +0100 |
commit | 85eb82b3c2a4af98fce7f9a578d5970425ca36a8 (patch) | |
tree | 06ac77a28c82d1384eaaaee2298e8967f616860a | |
parent | 1a715f5a47269a8d0088020198c3bfde9b34454d (diff) |
iio: resolver: 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. Use it in all the simple cases where
either a static buffer or a structure is used in the drivers.
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-16-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/resolver/ad2s1210.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/resolver/ad2s1210.c b/drivers/iio/resolver/ad2s1210.c index 80a2f7ebda8f..9b028c8bb1db 100644 --- a/drivers/iio/resolver/ad2s1210.c +++ b/drivers/iio/resolver/ad2s1210.c @@ -1340,7 +1340,8 @@ static irqreturn_t ad2s1210_trigger_handler(int irq, void *p) } ad2s1210_push_events(indio_dev, st->sample.fault, pf->timestamp); - iio_push_to_buffers_with_timestamp(indio_dev, &st->scan, pf->timestamp); + iio_push_to_buffers_with_ts(indio_dev, &st->scan, sizeof(st->scan), + pf->timestamp); error_ret: iio_trigger_notify_done(indio_dev->trig); |