diff options
| author | Tom Rix <[email protected]> | 2021-12-24 07:08:33 -0800 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2021-12-28 18:37:41 +0000 |
| commit | 38ac2f038666521f94d4fa37b5a9441cef832ccf (patch) | |
| tree | 640bf9147be8a20c07bc4f90a47a8764f7e8f2e8 /include/linux/timerqueue.h | |
| parent | 088879292a0a3672a6acc9215174fbc355ed3daa (diff) | |
iio: chemical: sunrise_co2: set val parameter only on success
Clang static analysis reports this representative warning
sunrise_co2.c:410:9: warning: Assigned value is garbage or undefined
*val = value;
^ ~~~~~
The ealier call to sunrise_read_word can fail without setting
value. So defer setting val until we know the read was successful.
Fixes: c397894e24f1 ("iio: chemical: Add Senseair Sunrise 006-0-007 driver")
Signed-off-by: Tom Rix <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions