linux/drivers/staging/iio
Arnd Bergmann b8fd722075 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 11:04:17 +02:00
..
accel staging:iio:accel:sca3000 Move out of staging. 2016-10-23 19:34:07 +01:00
adc staging:iio:ad7606: fix ptr_ret.cocci warnings 2016-10-23 19:34:27 +01:00
addac Staging: iio: addac: constify attribute_group structures 2016-10-03 21:07:24 +01:00
cdc staging: iio: cdc: ad7152: Replace mlock with a local mutex lock 2016-10-23 19:33:37 +01:00
Documentation Staging: iio: Documentation: Remove unused sysfs attributes 2016-01-30 16:27:11 +00: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 11:04:17 +02:00
light staging: iio: isl29018: move out of staging 2016-10-23 19:33:56 +01:00
meter Staging: iio: meter: ade7758_core: implement IIO_CHAN_INFO_SAMP_FREQ 2016-10-11 19:40:25 +01: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:TODO drop outdated entries in this todo. 2016-10-23 19:33:40 +01:00