diff --git a/device.c b/device.c index a1410746c..8ce3c924d 100644 --- a/device.c +++ b/device.c @@ -451,6 +451,8 @@ ssize_t iio_device_get_sample_size_mask(const struct iio_device *dev, size += 2 * length - (size % length); else size += length; + + prev = chn; } return size; }