diff options
| author | Arnd Bergmann <[email protected]> | 2016-10-24 17:22:01 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-10-25 11:04:17 +0200 |
| commit | b8fd7220752fe10f6df3755ce40aa0a9acd2c6be (patch) | |
| tree | a6a13b81f250efde78556a516fef3c9bf9a4b7a3 /tools/perf/scripts/python | |
| parent | fb26718744c46f34fb9b8cdf5f73030548978b49 (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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions