aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorFan Wu <fanwu01@zju.edu.cn>2026-09-03 08:13:12 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-09-10 00:43:05 +0200
commitdb560f4b1c5253853f978385db066220e0c218dc (patch)
tree63eec992629c700ed8cff1fdc85c50d0b879866d /scripts/Makefile.thinlto
parentpower: supply: mm8013: Publish the OF module alias (diff)
power: supply: bq27xxx: Ensure poll work is cancelled on remove
The di->work poll work is queued from the poll callback itself and from bq27xxx_external_power_changed(). The cancel_delayed_work_sync() in bq27xxx_battery_teardown() runs while the power_supply is still registered, so external_power_changed() can re-arm the work after the cancel, and it runs after the driver data has been freed. Register a devm_delayed_work_autocancel() before devm_power_supply_register(), so on unwind the power_supply is unregistered first, after which no new external_power_changed() callback can be dispatched, and the poll work is cancelled only then. Drop the now-redundant cancel from bq27xxx_battery_teardown(). This issue was found by an in-house static analysis tool. Fixes: 740b755a3b34 ("bq27x00: Poll battery state") Cc: stable@vger.kernel.org Assisted-by: Codex:gpt-5.6 Co-developed-by: Song Li <songl@zju.edu.cn> Signed-off-by: Song Li <songl@zju.edu.cn> Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Link: https://patch.msgid.link/20260903081312.225535-1-fanwu01@zju.edu.cn Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions