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:Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment