diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-05-07 19:30:41 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-10 14:01:48 +0100 |
commit | af0e1871d79cfbb91f732d2c6fa7558e45c31038 (patch) | |
tree | bc58e72d96cacf86779b804320d9fd9f993b45a1 /tools/perf/scripts/python/compaction-times.py | |
parent | af0670b0bf1b116fd729b1b1011cf814bc34e12e (diff) |
iio: tsl2583: Fix division by a zero lux_val
The lux_val returned from tsl2583_get_lux can potentially be zero,
so check for this to avoid a division by zero and an overflowed
gain_trim_val.
Fixes clang scan-build warning:
drivers/iio/light/tsl2583.c:345:40: warning: Either the
condition 'lux_val<0' is redundant or there is division
by zero at line 345. [zerodivcond]
Fixes: ac4f6eee8fe8 ("staging: iio: TAOS tsl258x: Device driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions