diff options
| author | Tom Rix <[email protected]> | 2020-08-09 10:55:51 -0700 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2020-09-21 20:01:50 +0100 |
| commit | f71e41e23e129640f620b65fc362a6da02580310 (patch) | |
| tree | d80b4f9b83aeed1975665503928de02fb5c0381c /scripts/const_structs.checkpatch | |
| parent | d390ff735d0a61e4703bf124866ef6d4be7fdc64 (diff) | |
iio:imu:st_lsm6dsx: check st_lsm6dsx_shub_read_output return
Potential error return is not checked. This can lead to use
of undefined data.
Detected by clang static analysis.
st_lsm6dsx_shub.c:540:8: warning: Assigned value is garbage or undefined
*val = (s16)le16_to_cpu(*((__le16 *)data));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
Signed-off-by: Tom Rix <[email protected]
Cc: <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions