diff options
| author | Kery Qi <qikeyu2017@gmail.com> | 2026-01-07 23:48:37 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-01-08 17:31:15 +0000 |
| commit | 5b577d214fcc109707bcb77b4ae72a31cfd86798 (patch) | |
| tree | 3748c9b48b8a6a505b800744f2c45c6d1c650503 /tools/perf/scripts/python/bin/git@git.tavy.me:linux.git | |
| parent | 2fa0eaf78c4bb24c2b05a4db3e0d86a7dcd8fd9f (diff) | |
ASoC: davinci-evm: Fix reference leak in davinci_evm_probe
The davinci_evm_probe() function calls of_parse_phandle() to acquire
device nodes for "ti,audio-codec" and "ti,mcasp-controller". These
functions return device nodes with incremented reference counts.
However, in several error paths (e.g., when the second of_parse_phandle(),
snd_soc_of_parse_card_name(), or devm_snd_soc_register_card() fails),
the function returns directly without releasing the acquired nodes,
leading to reference leaks.
This patch adds an error handling path 'err_put' to properly release
the device nodes using of_node_put() and clean up the pointers when
an error occurs.
Signed-off-by: Kery Qi <qikeyu2017@gmail.com>
Link: https://patch.msgid.link/20260107154836.1521-2-qikeyu2017@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
