]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: buffer: check return value of iio_compute_scan_bytes()
authorDavid Lechner <dlechner@baylibre.com>
Sun, 8 Mar 2026 01:44:10 +0000 (19:44 -0600)
committerJonathan Cameron <jic23@kernel.org>
Mon, 27 Apr 2026 08:58:15 +0000 (09:58 +0100)
commit78abd04ea19608dc8a025ba5b95cd21c5a86d3e6
treeea979bde7e0124210bccde030df0576e82a885ef
parent254f49634ee16a731174d2ae34bc50bd5f45e731
iio: buffer: check return value of iio_compute_scan_bytes()

Check return value of iio_compute_scan_bytes() as it can return an
error.

The result is moved to an output parameter while we are touching this
as we will need to add a second output parameter in a later change.

The return type of iio_buffer_update_bytes_per_datum() also had to be
changed to propagate the error.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c