sound/soc/renesas/rcar/ssiu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
rsnd_ssiu_probe() leaks an OF node reference obtained by
rsnd_ssiu_of_node(). The node reference is acquired but
never released across all return paths.
Fix it by declaring the device node with the __free(device_node)
cleanup construct to ensure automatic release when the variable goes
out of scope.
Fixes: 4e7788fb8018 ("ASoC: rsnd: add SSIU BUSIF support")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
---
sound/soc/renesas/rcar/ssiu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/renesas/rcar/ssiu.c b/sound/soc/renesas/rcar/ssiu.c
index faf351126d57..244fb833292a 100644
--- a/sound/soc/renesas/rcar/ssiu.c
+++ b/sound/soc/renesas/rcar/ssiu.c
@@ -509,7 +509,7 @@ void rsnd_parse_connect_ssiu(struct rsnd_dai *rdai,
int rsnd_ssiu_probe(struct rsnd_priv *priv)
{
struct device *dev = rsnd_priv_to_dev(priv);
- struct device_node *node;
+ struct device_node *node __free(device_node) = rsnd_ssiu_of_node(priv);
struct rsnd_ssiu *ssiu;
struct rsnd_mod_ops *ops;
const int *list = NULL;
@@ -522,7 +522,6 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
* see
* rsnd_ssiu_bufsif_to_id()
*/
- node = rsnd_ssiu_of_node(priv);
if (node)
nr = rsnd_node_count(priv, node, SSIU_NAME);
else
--
2.50.1.windows.1
On Wed, 12 Nov 2025 14:57:09 +0800, Haotian Zhang wrote:
> rsnd_ssiu_probe() leaks an OF node reference obtained by
> rsnd_ssiu_of_node(). The node reference is acquired but
> never released across all return paths.
>
> Fix it by declaring the device node with the __free(device_node)
> cleanup construct to ensure automatic release when the variable goes
> out of scope.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rsnd: fix OF node reference leak in rsnd_ssiu_probe()
commit: 360b3730f8eab6c4467c6cca4cb0e30902174a63
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
Hi Haotian
> rsnd_ssiu_probe() leaks an OF node reference obtained by
> rsnd_ssiu_of_node(). The node reference is acquired but
> never released across all return paths.
>
> Fix it by declaring the device node with the __free(device_node)
> cleanup construct to ensure automatic release when the variable goes
> out of scope.
>
> Fixes: 4e7788fb8018 ("ASoC: rsnd: add SSIU BUSIF support")
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
© 2016 - 2026 Red Hat, Inc.