From c72503cc5d70bb10779127a2a6028cf1a3cce9b0 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 22 Feb 2010 13:27:13 +0200 Subject: [PATCH] --- yaml --- r: 182898 b: refs/heads/master c: b9dd94a87e5b4d0e864636698931aeeeb3c9d770 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-core.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8550f9cdea9a..d760a9c26421 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6c5f1fed49f96a0600aa9a97ac3faf972c33a341 +refs/heads/master: b9dd94a87e5b4d0e864636698931aeeeb3c9d770 diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index e1c0336868e1..a03bac943aaf 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -963,6 +963,12 @@ static int soc_resume(struct device *dev) struct snd_soc_card *card = socdev->card; struct snd_soc_dai *cpu_dai = card->dai_link[0].cpu_dai; + /* If the initialization of this soc device failed, there is no codec + * associated with it. Just bail out in this case. + */ + if (!card->codec) + return 0; + /* AC97 devices might have other drivers hanging off them so * need to resume immediately. Other drivers don't have that * problem and may take a substantial amount of time to resume