7cd04c863f
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:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
acpi-als.c | ||
adjd_s311.c | ||
adux1020.c | ||
al3010.c | ||
al3320a.c | ||
apds9300.c | ||
apds9960.c | ||
as73211.c | ||
bh1750.c | ||
bh1780.c | ||
cm3232.c | ||
cm3323.c | ||
cm3605.c | ||
cm32181.c | ||
cm36651.c | ||
cros_ec_light_prox.c | ||
gp2ap002.c | ||
gp2ap020a00f.c | ||
hid-sensor-als.c | ||
hid-sensor-prox.c | ||
iqs621-als.c | ||
isl29018.c | ||
isl29028.c | ||
isl29125.c | ||
jsa1212.c | ||
lm3533-als.c | ||
ltr501.c | ||
lv0104cs.c | ||
max44000.c | ||
max44009.c | ||
noa1305.c | ||
opt3001.c | ||
pa12203001.c | ||
rpr0521.c | ||
si1133.c | ||
si1145.c | ||
st_uvis25.h | ||
st_uvis25_core.c | ||
st_uvis25_i2c.c | ||
st_uvis25_spi.c | ||
stk3310.c | ||
tcs3414.c | ||
tcs3472.c | ||
tsl2563.c | ||
tsl2583.c | ||
tsl2591.c | ||
tsl2772.c | ||
tsl4531.c | ||
us5182d.c | ||
vcnl4000.c | ||
vcnl4035.c | ||
veml6030.c | ||
veml6070.c | ||
vl6180.c | ||
zopt2201.c |