summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/host_pci.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-09-22 11:43:42 +0200
committerJonathan Cameron <jic23@kernel.org>2016-09-22 19:36:57 +0200
commita1427af59977894d20b1b5ea61f4b2856c7d1833 (patch)
tree2597f5288e9679441db2c4d903ca806ced9f35a4 /drivers/bcma/host_pci.c
parentStaging: speakup: kobjects: Add space around the operator. (diff)
downloadlinux-a1427af59977894d20b1b5ea61f4b2856c7d1833.tar.xz
linux-a1427af59977894d20b1b5ea61f4b2856c7d1833.zip
iio: accel: sca3000_core: avoid potentially uninitialized variable
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: e0f3fc9b47e6 ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/bcma/host_pci.c')
0 files changed, 0 insertions, 0 deletions