Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
Aaa, that is true! Sorry my mistake :( Best regards Rickard Strandqvist 2014-06-01 14:03 GMT+02:00 Lars-Peter Clausen : > On 06/01/2014 01:51 PM, Rickard Strandqvist wrote: >> >> Hi >> >> Believe it reacted to the code below. >> >> If raw_sample = 0 is the correct starting value, I am not sure

Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Lars-Peter Clausen
On 06/01/2014 01:51 PM, Rickard Strandqvist wrote: Hi Believe it reacted to the code below. If raw_sample = 0 is the correct starting value, I am not sure. But leaving it uninitialized, I think is the worst choice. if (ret < 0) goto out; ret = ad_sd_read_reg(sigma_delta, A

Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
Hi Believe it reacted to the code below. If raw_sample = 0 is the correct starting value, I am not sure. But leaving it uninitialized, I think is the worst choice. if (ret < 0) goto out; ret = ad_sd_read_reg(sigma_delta, AD_SD_REG_DATA, DIV_ROUND_UP(chan->scan_type.real

Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Lars-Peter Clausen
On 06/01/2014 01:11 AM, Rickard Strandqvist wrote: There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. This looks like a false positive. And if it was not a false positive the correct fix cer

[PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-05-31 Thread Rickard Strandqvist
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/iio/adc/ad_sigma_delta.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git