diff options
Diffstat (limited to 'sound/soc/soc-core.c')
| -rw-r--r-- | sound/soc/soc-core.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c8b0556ef43..ad7f9528d75 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -28,6 +28,7 @@  #include <linux/bitops.h>  #include <linux/debugfs.h>  #include <linux/platform_device.h> +#include <linux/slab.h>  #include <sound/ac97_codec.h>  #include <sound/core.h>  #include <sound/pcm.h> @@ -1548,7 +1549,8 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)  			mutex_unlock(&codec->mutex);  			return ret;  		} -		if (card->dai_link[i].codec_dai->ac97_control) { +		/* Check for codec->ac97 to handle the ac97.c fun */ +		if (card->dai_link[i].codec_dai->ac97_control && codec->ac97) {  			snd_ac97_dev_add_pdata(codec->ac97,  				card->dai_link[i].cpu_dai->ac97_pdata);  		}  |