diff options
| author | 2016-10-24 17:22:01 +0200 | |
|---|---|---|
| committer | 2016-10-25 11:04:17 +0200 | |
| commit | b8fd7220752fe10f6df3755ce40aa0a9acd2c6be (patch) | |
| tree | a6a13b81f250efde78556a516fef3c9bf9a4b7a3 /tools/perf/scripts | |
| parent | staging: rtl8188eu: os_dep: remove unnecessary alloc fail message (diff) | |
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>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
