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 iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
adux1020.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
al3010.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
al3320a.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
apds9300.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
apds9960.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
as73211.c iio: light: as73211: Increase measurement timeout 2020-09-13 10:37:46 +01:00
bh1750.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
bh1780.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
cm3232.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
cm3323.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
cm3605.c iio: remove left-over parent assignments 2020-06-14 11:50:04 +01:00
cm32181.c iio: light: cm32181: Fix formatting and docrot issues in cm32181_acpi_get_cpm() 2020-07-20 09:03:07 +01:00
cm36651.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
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 iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
isl29018.c iio: light: isl29018: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
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 iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
lm3533-als.c iio: light: lm3533-als: use iio_device_set_parent() to assign parent 2020-06-14 11:50:02 +01:00
ltr501.c iio: ltr501: mark ltr501_chip_info as const 2021-06-13 17:00:18 +01:00
lv0104cs.c Replace HTTP links with HTTPS ones: drivers/iio 2020-07-13 15:05:59 +01:00
max44000.c iio:light:max44000 Fix timestamp alignment and prevent data leak. 2020-08-22 11:38:57 +01:00
max44009.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
noa1305.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
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 iio: light: st_uvis25: Add mod_devicetable.h and drop of_match_ptr 2020-04-25 15:44:36 +01:00
st_uvis25_spi.c iio: light: st_uvis25: Add mod_devicetable.h and drop of_match_ptr 2020-04-25 15:44:36 +01:00
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 iio: light: tsl2772: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
tsl4531.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
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 iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
vl6180.c iio: vl6180: Use DIV_ROUND_CLOSEST() instead of open-coding it 2021-01-09 21:52:45 +00:00
zopt2201.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00