summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorLiu Zhenlong <dragonliu2018@gmail.com>2026-08-19 01:57:50 +0800
committerAndi Shyti <andi.shyti@kernel.org>2026-09-20 09:40:29 +0200
commit7362a1553eb09a8cdf8be7e509bd5309a8342486 (patch)
tree7f5dffb195f4850e7a5a1e4fa36daf7f58c84e81 /tools/perf/scripts/python/export-to-postgresql.py
parent268aacb2e2a5c94d08e23194961234d0710c8407 (diff)
downloadlinux-next-7362a1553eb09a8cdf8be7e509bd5309a8342486.tar.gz
linux-next-7362a1553eb09a8cdf8be7e509bd5309a8342486.zip
i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove()
The of_node_put() matching of_node_get() runs after i2c_del_adapter(), whose trailing memset() zeroes adap->dev and thus adap->dev.of_node, making the put a no-op and leaking the node on every adapter removal and error cleanup. Use a devm action: the pointer is captured at registration, out of reach of that memset(), and devres runs the put once on probe failure and detach, replacing the three manual of_node_put() calls. The setup loop uses the scoped iterator form so the child node is released automatically if devm_add_action_or_reset() fails mid-loop. Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: 02a4a69667a2 ("i2c: qcom-cci: don't put a device tree node before i2c_add_adapter()") Assisted-by: Claude:claude-opus-5 Signed-off-by: Liu Zhenlong <dragonliu2018@gmail.com> Cc: <stable@vger.kernel.org> # v5.17+ Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patch.msgid.link/20260818175750.4205-1-dragonliu2018@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions