ASoC: rsnd: fix OF node reference leak in rsnd_ssiu_probe()
authorHaotian Zhang <vulab@iscas.ac.cn>
Wed, 12 Nov 2025 06:57:09 +0000 (14:57 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 13 Nov 2025 00:36:01 +0000 (00:36 +0000)
commit360b3730f8eab6c4467c6cca4cb0e30902174a63
treecb2be1d7999fb2cf5c87d4ebb4f62cf0be09917b
parenteb2d6774cc0d9d6ab8f924825695a85c14b2e0c2
ASoC: rsnd: fix OF node reference leak in rsnd_ssiu_probe()

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>
Link: https://patch.msgid.link/20251112065709.1522-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/ssiu.c