Re: [PATCH] iio: accel: sca3000_core: avoid potentially uninitialized variable

2016-09-22 Thread Jonathan Cameron
On 22/09/16 10:43, Arnd Bergmann wrote: > The newly added __sca3000_get_base_freq function handles all valid > modes of the SCA3000_REG_ADDR_MODE register, but gcc notices > that any other value (i.e. 0x00) causes the base_freq variable to > not get initialized: > > drivers/staging/iio/accel/sca30

[PATCH] iio: accel: sca3000_core: avoid potentially uninitialized variable

2016-09-22 Thread Arnd Bergmann
The newly added __sca3000_get_base_freq function handles all valid modes of the SCA3000_REG_ADDR_MODE register, but gcc notices that any other value (i.e. 0x00) causes the base_freq variable to not get initialized: drivers/staging/iio/accel/sca3000_core.c: In function 'sca3000_write_raw': drivers/