WSL2-Linux-Kernel/drivers/iio/light
frank zago 7cd04c863f iio: light: tcs3472: do not free unallocated IRQ
Allocating an IRQ is conditional to the IRQ existence, but freeing it
was not. If no IRQ was allocate, the driver would still try to free
IRQ 0. Add the missing checks.

This fixes the following trace when the driver is removed:

[  100.667788] Trying to free already-free IRQ 0
[  100.667793] WARNING: CPU: 0 PID: 2315 at kernel/irq/manage.c:1826 free_irq+0x1fd/0x370
...
[  100.667914] Call Trace:
[  100.667920]  tcs3472_remove+0x3a/0x90 [tcs3472]
[  100.667927]  i2c_device_remove+0x2b/0xa0

Signed-off-by: frank zago <frank@zago.net>
Link: https://lore.kernel.org/r/20210427022017.19314-2-frank@zago.net
Fixes: 9d2f715d59 ("iio: light: tcs3472: support out-of-threshold events")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-06-16 14:57:03 +01:00
..
Kconfig iio: light: Added AMS tsl2591 driver implementation 2021-05-17 13:49:06 +01:00
Makefile iio: light: Added AMS tsl2591 driver implementation 2021-05-17 13:49:06 +01:00
acpi-als.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01: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-sensors: Update header includes 2021-06-16 14:53:13 +01:00
hid-sensor-prox.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
iqs621-als.c
isl29018.c
isl29028.c iio: light: isl29028: Balance runtime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:25 +01:00
isl29125.c iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:30 +01:00
jsa1212.c
lm3533-als.c
ltr501.c iio: ltr501: mark ltr501_chip_info as const 2021-06-13 17:00:18 +01:00
lv0104cs.c
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 iio: light: pa12203001: Use pm_runtime_resume_and_get() to replace open coding. 2021-05-17 13:54:31 +01:00
rpr0521.c iio: light: rpr0521: Balance runtime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:27 +01:00
si1133.c iio: light: si1133: Drop remaining uses of %hhx format string. 2021-06-09 18:31:03 +01:00
si1145.c iio: light: si1145: Drop use of %hhx format specifier. 2021-06-09 18:31:03 +01:00
st_uvis25.h iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2020-12-03 19:40:27 +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
stk3310.c iio: Remove kernel-doc keyword in file header comment 2021-03-25 19:13:49 +00:00
tcs3414.c iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-05-17 13:54:30 +01:00
tcs3472.c iio: light: tcs3472: do not free unallocated IRQ 2021-06-16 14:57:03 +01:00
tsl2563.c iio:light:tsl2563 use generic fw accessors 2020-11-01 15:28:55 +00:00
tsl2583.c iio: light: tsl2583: Balance runtime pm + use pm_runtime_resume_and_get() 2021-05-17 13:54:25 +01:00
tsl2591.c iio: light: tsl2591: delete a stray tab 2021-05-17 14:10:24 +01:00
tsl2772.c
tsl4531.c
us5182d.c iio: light: us5182: Use pm_runtime_resume_and_get() to replace open coding. 2021-05-17 13:54:26 +01:00
vcnl4000.c iio: light: vcnl4000: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-06-14 11:42:41 +01:00
vcnl4035.c iio: light: vcnl4035: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-06-16 14:53:08 +01:00
veml6030.c iio: light: Convert sysfs sprintf/snprintf family to sysfs_emit 2021-05-17 13:49:05 +01:00
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