aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2025-01-06 05:49:33 +0000
committerMark Brown <broonie@kernel.org>2025-01-13 14:16:53 +0000
commitc8903242bcb119660232c9cbf336fea3737d1a60 (patch)
treea71f661872c3f4f0a949193db0d7ef740d03b849
parentASoC: simple-card: use __free(device_node) for device node (diff)
downloadwireguard-linux-c8903242bcb119660232c9cbf336fea3737d1a60.tar.xz
wireguard-linux-c8903242bcb119660232c9cbf336fea3737d1a60.zip
ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw()
snd_soc_daifmt_parse_clock_provider_raw() might be called with NULL np. Return 0 in such case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Stephen Gordon <gordoste@iinet.net.au> Link: https://patch.msgid.link/87ttaco5jm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ca1db7174051..9d2c8b393944 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3369,6 +3369,9 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np,
char prop[128];
unsigned int bit, frame;
+ if (!np)
+ return 0;
+
if (!prefix)
prefix = "";