linux/sound/soc/ti
Kery Qi 5b577d214f
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>
History 2026-01-08 17:31:15 +00:00
..
ams-delta.c ASoC: ti: ams-delta: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:40 +00:00
davinci-evm.c ASoC: davinci-evm: Fix reference leak in davinci_evm_probe 2026-01-08 17:31:15 +00:00
davinci-i2s.c ASoC: ti: davinci-i2s: remove unnecessary NULL check before clk_disable_unprepare() 2025-03-16 23:33:36 +00:00
davinci-i2s.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
davinci-mcasp.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
davinci-mcasp.h ASoC: ti: davinci-mcasp: Improve the sysclk selection 2019-12-09 18:35:37 +00:00
edma-pcm.c ASoC: ti: edma-pcm: Fix for legacy dma_slave_map based channel lookup 2019-08-30 12:22:46 +01:00
edma-pcm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
j721e-evm.c ASoC: ti: j721e-evm: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:42 +00:00
Kconfig ASoC: ti: Standardize ASoC menu 2025-06-24 01:01:08 +01:00
Makefile ASoC: ti: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:35 +09:00
n810.c ASoC: ti: n810: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:43 +00:00
omap-abe-twl6040.c ASoC: ti: omap-abe-twl6040: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:44 +00:00
omap-dmic.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
omap-dmic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-hdmi.c ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init 2025-06-02 12:27:43 +01:00
omap-mcbsp-priv.h ASoC: ti: omap-mcbsp: duplicate sysfs error 2022-07-07 17:16:21 +01:00
omap-mcbsp-st.c ASoC: ti: convert not to use asoc_xxx() 2023-09-25 14:16:16 +02:00
omap-mcbsp.c ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
omap-mcbsp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
omap-mcpdm.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
omap-mcpdm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
omap-twl4030.c ASoC: ti: omap-twl4030: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:45 +00:00
omap3pandora.c ASoC: ti: omap3pandora: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:46 +00:00
osk5912.c ASoC: ti: osk5912: use inclusive language for SND_SOC_DAIFMT_CBx_CFx 2025-03-03 12:57:12 +00:00
rx51.c ASoC: ti: rx51: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:47 +00:00
sdma-pcm.c ASoC: omap: Replace HTTP links with HTTPS ones 2020-07-23 19:52:24 +01:00
sdma-pcm.h ASoC: omap: Replace HTTP links with HTTPS ones 2020-07-23 19:52:24 +01:00
udma-pcm.c ASoC: ti: Replace HTTP links with HTTPS ones 2020-07-23 19:52:21 +01:00
udma-pcm.h ASoC: ti: Replace HTTP links with HTTPS ones 2020-07-23 19:52:21 +01:00