ASoC: core: Fix dai_link dereference.
We should check dailess before dereferencing.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4d88698..a61671b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1218,7 +1218,7 @@
#ifdef CONFIG_DEBUG_FS
/* add DPCM sysfs entries */
- if (!dai_link->dynamic)
+ if (!dailess && !dai_link->dynamic)
goto out;
ret = soc_dpcm_debugfs_add(rtd);