From: Kuninori Morimoto Date: Mon, 6 Jan 2025 05:49:33 +0000 (+0000) Subject: ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() X-Git-Tag: v6.14-rc1~111^2~7^2~6^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8903242bcb119660232c9cbf336fea3737d1a60;p=thirdparty%2Fkernel%2Flinux.git 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 Tested-by: Stephen Gordon Link: https://patch.msgid.link/87ttaco5jm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ca1db71740510..9d2c8b3939446 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 = "";