Re: [patch] Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw()

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

 



On 10/30/11 10:45, Lars-Peter Clausen wrote:
> On 10/29/2011 09:21 AM, Dan Carpenter wrote:
>> ad5360_get_channel_vref() returns an int and scale_uv should be the
>> same.  Making it unsigned here breaks the error handling.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>>
> 
> Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23cam.ac.uk>
> 
> Thanks.
> 
>> diff --git a/drivers/staging/iio/dac/ad5360.c b/drivers/staging/iio/dac/ad5360.c
>> index 72d0f3f..cfeea72 100644
>> --- a/drivers/staging/iio/dac/ad5360.c
>> +++ b/drivers/staging/iio/dac/ad5360.c
>> @@ -371,8 +371,8 @@ static int ad5360_read_raw(struct iio_dev *indio_dev,
>>  			   long m)
>>  {
>>  	struct ad5360_state *st = iio_priv(indio_dev);
>> -	unsigned long scale_uv;
>>  	unsigned int ofs_index;
>> +	int scale_uv;
>>  	int ret;
>>  
>>  	switch (m) {
> 
> 

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux