ASoC: core: Fix dai_link dereference.
authorLiam Girdwood <lrg@ti.com>
Mon, 30 Apr 2012 10:05:30 +0000 (11:05 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 30 Apr 2012 10:09:13 +0000 (11:09 +0100)
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>
sound/soc/soc-core.c

index 4d8869852ad6f41e2ac24f0572fdd801eda0f153..a61671b89e9be64fbb81f35082f9ec6acbf901eb 100644 (file)
@@ -1218,7 +1218,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
 
 #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);