1
0
Fork 0
alistair23-linux/drivers/staging/iio
Arnd Bergmann 34eee70a7b staging: iio: ad5933: avoid uninitialized variable in error case
The ad5933_i2c_read function returns an error code to indicate
whether it could read data or not. However ad5933_work() ignores
this return code and just accesses the data unconditionally,
which gets detected by gcc as a possible bug:

drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work':
drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized]

This adds minimal error handling so we only evaluate the
data if it was correctly read.

Link: https://patchwork.kernel.org/patch/8110281/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-25 18:28:52 +01:00
..
Documentation Staging: iio: Documentation: Remove unused sysfs attributes 2016-01-30 16:27:11 +00:00
accel iio: accel: sca3000_core: avoid potentially uninitialized variable 2016-10-23 22:18:45 +01:00
adc Staging: iio: adc: constify attribute_group structures 2016-09-27 13:03:57 +02:00
addac iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
cdc iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
frequency Staging: iio: ad9832: Replace 'unsigned' with 'unsigned int' 2016-03-28 07:30:36 -07:00
gyro spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
impedance-analyzer staging: iio: ad5933: avoid uninitialized variable in error case 2016-10-25 18:28:52 +01:00
light Staging: iio: light: constify attribute_group structures 2016-09-27 13:03:57 +02:00
meter staging: iio: meter: ade7754: Match alignment with open parenthesis 2016-09-20 13:43:32 +02:00
resolver staging: iio: convert bare unsigned usage to unsigned int 2016-03-28 09:37:41 +01:00
trigger First round of IIO new device support, features and cleanups for the 4.7 cycle. 2016-04-04 12:31:05 -07:00
Kconfig iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
Makefile iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
TODO staging:iio: Remove periodic RTC trigger driver 2016-02-27 17:18:38 +00:00
ring_hw.h staging: iio: Add #include guards to header files 2014-09-28 22:19:04 -04:00