Re: [PATCH 1/2] iio:kfifo_buf Take advantage of the fixed record size used in IIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/30/2012 02:52 PM, Jonathan Cameron wrote:
> @@ -106,11 +108,12 @@ static int iio_read_first_n_kfifo(struct iio_buffer *r,
>  	int ret, copied;
>  	struct iio_kfifo *kf = iio_to_kfifo(r);
>  
> -	if (n < r->bytes_per_datum)
> +	if (n < r->bytes_per_datum || r->bytes_per_datum == 0)
>  		return -EINVAL;

Strictly speaking this is a unrelated change, but well...

I'll apply the kfifo patches to my IIO working tree and see if I'll get any
issues.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux