[PATCH 1/5] ASoC: rsnd: fix NULL dereference when remote port has no endpoint
From: shao.mingyin
Date: Sat Nov 07 2026 - 03:11:20 EST
From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
rsnd_parse_connect_graph() uses the node returned by
of_graph_get_remote_port_parent() without checking it for NULL. An
endpoint node with no remote-endpoint phandle yields NULL, and the
following strstr() on remote_node->full_name dereferences it during
probe.
Return early when the remote node is absent, so a graph link that does
not lead anywhere is ignored instead of crashing the kernel.
Fixes: beed78aeeb10 ("ASoC: rsnd: move HDMI information from ssi.c to core.c")
Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
---
diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index b7954746e953..6fba4f46868b 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -1140,6 +1140,8 @@ static void rsnd_parse_connect_graph(struct rsnd_priv *priv,
return;
remote_node = of_graph_get_remote_port_parent(endpoint);
+ if (!remote_node)
+ return;
/* HDMI0 */
if (strstr(remote_node->full_name, "hdmi@fead0000")) {