kernel_samsung_a53x/drivers/power/supply
Hans de Goede 02a2e05029 power: supply: bq27xxx-i2c: Do not free non existing IRQ
[ Upstream commit 2df70149e73e79783bcbc7db4fa51ecef0e2022c ]

The bq27xxx i2c-client may not have an IRQ, in which case
client->irq will be 0. bq27xxx_battery_i2c_probe() already has
an if (client->irq) check wrapping the request_threaded_irq().

But bq27xxx_battery_i2c_remove() unconditionally calls
free_irq(client->irq) leading to:

[  190.310742] ------------[ cut here ]------------
[  190.310843] Trying to free already-free IRQ 0
[  190.310861] WARNING: CPU: 2 PID: 1304 at kernel/irq/manage.c:1893 free_irq+0x1b8/0x310

Followed by a backtrace when unbinding the driver. Add
an if (client->irq) to bq27xxx_battery_i2c_remove() mirroring
probe() to fix this.

Fixes: 444ff00734f3 ("power: supply: bq27xxx: Fix I2C IRQ race on remove")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240215155133.70537-1-hdegoede@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 23:18:29 +01:00
..
88pm860x_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
88pm860x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_bmdata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_btemp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_fg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abx500_chargalg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act8945a_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adp5061.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_ac_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_usb_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp288_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp288_fuel_gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd70528-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd99954-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd99954-charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq27xxx_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq27xxx_battery_hdq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq27xxx_battery_i2c.c power: supply: bq27xxx-i2c: Do not free non existing IRQ 2024-11-18 23:18:29 +01:00
bq2415x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq2515x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24190_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24257_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24735-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25890_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25980_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25980_charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
charger-manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
collie_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_usbpd-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cw2015_battery.c power: supply: cw2015: correct time_to_empty units in sysfs 2024-11-18 12:12:49 +01:00
da9030_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9052-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-fg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2760_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2780_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2781_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2782_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic-adc-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
goldfish_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifpmic_class.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipaq_micro_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isp1704_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lego_ev3_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8727_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8788-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lt3651-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2941-battery-gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1721x_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8903_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8925_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8997_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8998_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max14577_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max14656_charger_detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max17040_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max17042_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max77650-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max77693_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mp2629_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
olpc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcf50633-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pda_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm2301_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm2301_charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_leds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_smbb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rn5t618_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rt5033_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rt9455_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rx51_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2asl01_switching.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2m_chg_manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mc501_direct_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mc501_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_fuelgauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_top.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_fuelgauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c_adc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc27xx_fuel_gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc2731_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smb347-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tosa_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps65090-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps65217_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl4030_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl4030_madc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucs1002_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wilco-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm97xx_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm831x_backup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm831x_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm8350_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
z2_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00