Commit 40c7e706 authored by Hans de Goede's avatar Hans de Goede Committed by sanglipeng
Browse files

power: supply: bq27xxx: Fix I2C IRQ race on remove

stable inclusion
from stable-v5.10.181
commit 1da9a4b55a6688e3a30c16d0cf2e7c6a90a684fb
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8GJZJ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1da9a4b55a6688e3a30c16d0cf2e7c6a90a684fb



--------------------------------

commit 444ff007 upstream.

devm_request_threaded_irq() requested IRQs are only free-ed after
the driver's remove function has ran. So the IRQ could trigger and
call bq27xxx_battery_update() after bq27xxx_battery_teardown() has
already run.

Switch to explicitly free-ing the IRQ in bq27xxx_battery_i2c_remove()
to fix this.

Fixes: 8807feb9 ("power: bq27xxx_battery: Add interrupt handling support")
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 8bb19ece
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment