linux/drivers/iio/light
Colin Ian King af0e1871d7 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: ac4f6eee8f ("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>
2021-05-10 14:01:48 +01:00
..
acpi-als.c ACPI updates for 5.13-rc1 2021-04-26 15:03:23 -07:00
adjd_s311.c
adux1020.c
al3010.c
al3320a.c
apds9300.c
apds9960.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
as73211.c
bh1750.c
bh1780.c
cm3232.c
cm3323.c
cm3605.c
cm32181.c
cm36651.c
cros_ec_light_prox.c iio: cros: unify hw fifo attributes without API changes 2021-03-25 19:13:52 +00:00
gp2ap002.c iio: light: gp2ap002: Fix rumtime PM imbalance on error 2021-05-10 14:01:48 +01:00
gp2ap020a00f.c iio: gp2ap020a00f: Remove code to set trigger parent 2021-03-25 19:13:50 +00:00
hid-sensor-als.c iio: hid-sensor-als: Add relative hysteresis support 2021-03-11 20:47:09 +00:00
hid-sensor-prox.c 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle 2021-03-26 12:09:47 +01:00
iqs621-als.c
isl29018.c
isl29028.c
isl29125.c
jsa1212.c
Kconfig iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-10 14:01:48 +01:00
lm3533-als.c
ltr501.c
lv0104cs.c
Makefile
max44000.c
max44009.c
noa1305.c
opt3001.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
pa12203001.c
rpr0521.c iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
si1133.c
si1145.c iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
st_uvis25_core.c iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
st_uvis25_i2c.c
st_uvis25_spi.c
st_uvis25.h
stk3310.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
tcs3414.c
tcs3472.c
tsl2563.c
tsl2583.c iio: tsl2583: Fix division by a zero lux_val 2021-05-10 14:01:48 +01:00
tsl2772.c
tsl4531.c
us5182d.c
vcnl4000.c iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
vcnl4035.c iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
veml6030.c
veml6070.c
vl6180.c iio: vl6180: Use DIV_ROUND_CLOSEST() instead of open-coding it 2021-01-09 21:52:45 +00:00
zopt2201.c