summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMa Ke <make_ruc2021@163.com>2026-07-22 12:44:16 +0800
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-07-25 02:00:45 +0200
commit863c32a83e4235eb0cbf6106f2b124e645302156 (patch)
treea1bbf88e4610b537107ac60687c91ca34623757b /tools/perf/scripts/python
parentaf4ee48a09cfb7a2440cc4822e9fda43a76cfbe5 (diff)
power: supply: bq25890: Fix power_supply reference leak
bq25890_fw_probe() acquires a reference to a secondary charger using power_supply_get_by_name(), but the reference is not released on later probe failures or on driver detach. In particular, failures after bq25890_fw_probe() returns successfully, such as a failure in bq25890_hw_init(), also leak the reference. Register a device-managed cleanup action immediately after acquiring the secondary charger. This releases the reference on all subsequent probe failures and on driver detach. Found by code review. Signed-off-by: Ma Ke <make_ruc2021@163.com> Cc: stable@vger.kernel.org Fixes: d54bf877fd87 ("power: supply: bq25890: Add support for having a secondary charger IC") Link: https://patch.msgid.link/20260722044416.1623621-1-make_ruc2021@163.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions