1. 23 9月, 2016 1 次提交
    • A
      iio: accel: sca3000_core: avoid potentially uninitialized variable · a1427af5
      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/staging/iio/accel/sca3000_core.c:527:23: error: 'base_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This adds explicit error handling for unexpected register values,
      to ensure this cannot happen.
      
      Fixes: e0f3fc9b ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      a1427af5
  2. 22 9月, 2016 26 次提交
  3. 21 9月, 2016 13 次提交