Re: [PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-29 Thread Vladimirs Ambrosovs
On Thu, May 28, 2015 at 09:59:34AM +0300, Dan Carpenter wrote: On Thu, May 28, 2015 at 01:12:40AM +0300, Vladimirs Ambrosovs wrote: On Wed, May 27, 2015 at 11:25:07AM +0300, Dan Carpenter wrote: On Wed, May 27, 2015 at 01:19:58AM +0300, Vladimirs Ambrosovs wrote: Check for zero was added

Re: [PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 01:12:40AM +0300, Vladimirs Ambrosovs wrote: On Wed, May 27, 2015 at 11:25:07AM +0300, Dan Carpenter wrote: On Wed, May 27, 2015 at 01:19:58AM +0300, Vladimirs Ambrosovs wrote: Check for zero was added to the module parameter instances to avoid the allocation of

Re: [PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-27 Thread Dan Carpenter
On Wed, May 27, 2015 at 01:19:58AM +0300, Vladimirs Ambrosovs wrote: Check for zero was added to the module parameter instances to avoid the allocation of array of zero values. Although it is a valid call, we don't want to allocate ZERO_SIZE_PTR, so need to disallow this case. The type of

Re: [PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-27 Thread Vladimirs Ambrosovs
On Wed, May 27, 2015 at 11:25:07AM +0300, Dan Carpenter wrote: On Wed, May 27, 2015 at 01:19:58AM +0300, Vladimirs Ambrosovs wrote: Check for zero was added to the module parameter instances to avoid the allocation of array of zero values. Although it is a valid call, we don't want to

[PATCH 2/2] staging: iio_simple_dummy: zero check param

2015-05-26 Thread Vladimirs Ambrosovs
Check for zero was added to the module parameter instances to avoid the allocation of array of zero values. Although it is a valid call, we don't want to allocate ZERO_SIZE_PTR, so need to disallow this case. The type of variables which are compared to instances were also changed to unsigned int