diff options
author | 2024-05-28 05:05:24 +0000 | |
---|---|---|
committer | 2024-06-03 15:59:35 +0100 | |
commit | 33ae57277ce08b83c65c18a09bf09499de613c01 (patch) | |
tree | c75176dc62dd8f102956d9191c71acf77447be98 /sound/soc/generic/simple-card-utils.c | |
parent | ASoC: audio-graph-card2: add ep_to_port() / port_to_ports() (diff) | |
download | wireguard-linux-33ae57277ce08b83c65c18a09bf09499de613c01.tar.xz wireguard-linux-33ae57277ce08b83c65c18a09bf09499de613c01.zip |
ASoC: audio-graph-card2: remove ports node name check
Current audio-graph-card2 is checking if the node name was "ports" or
not when parsing the property.
if (of_node_name_eq(ports, "ports"))
of_xxx(ports, ...);
Now, it is using new port_to_ports() which will be NULL if the node
doesn't have "ports", and each of_xxx functions will do nothing if
node was NULL.
Now we don't need to check ports node name. Let's remove and cleanup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/877cfeh6gb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic/simple-card-utils.c')
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index bc4d518c35cb..a655f20428af 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -60,6 +60,9 @@ void simple_util_parse_convert(struct device_node *np, { char prop[128]; + if (!np) + return; + if (!prefix) prefix = ""; |