From e44ce698f14ec32a489cafd6fa25aaf6d967718b Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 3 Jun 2009 17:44:49 +0200 Subject: [PATCH] --- yaml --- r: 148325 b: refs/heads/master c: e3509ff0fb9df53e45cd68488e3b463a80455db7 h: refs/heads/master i: 148323: 1fb2f351e217dbd723cb168b456e48807304ed45 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 f435d997d18b..4844d3a39614 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d08664fdb50795b29cf70b0269ea02f7248e76c3 +refs/heads/master: e3509ff0fb9df53e45cd68488e3b463a80455db7 diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 4aa8e2d35061..3f44150d8e30 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -628,6 +628,12 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state) struct snd_soc_codec *codec = card->codec; int i; + /* If the initialization of this soc device failed, there is no codec + * associated with it. Just bail out in this case. + */ + if (!codec) + return 0; + /* Due to the resume being scheduled into a workqueue we could * suspend before that's finished - wait for it to complete. */