diff options
author | William Lai <b04597@freescale.com> | 2010-07-19 10:26:27 +0800 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2010-12-17 12:10:52 -0500 |
commit | a8f125151fb9ee95ff290fddb80f568ddb039c48 (patch) | |
tree | f09b6709c37b9df2a4637d58812a14e4d6b61d8b | |
parent | f02f6af196cd06cf828d2beca5880e5a4829b21c (diff) |
ENGR00125263 ALSA CS42888: System hangs when suspend and resume
Avoid of registering the audio sub-system when the codec does
not exist.
Signed-off-by: William Lai <b04597@freescale.com>
-rw-r--r-- | sound/soc/imx/imx-3stack-cs42888.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-3stack-cs42888.c b/sound/soc/imx/imx-3stack-cs42888.c index a71af348cab4..6a5f1b6e0c58 100644 --- a/sound/soc/imx/imx-3stack-cs42888.c +++ b/sound/soc/imx/imx-3stack-cs42888.c @@ -379,6 +379,11 @@ static int __init imx_3stack_asoc_init(void) ret = platform_driver_register(&imx_3stack_cs42888_driver); if (ret < 0) goto exit; + + if (snd_soc_card_imx_3stack.codec == NULL) { + ret = -ENOMEM; + goto err_device_alloc; + } imx_3stack_snd_device = platform_device_alloc("soc-audio", 1); if (!imx_3stack_snd_device) goto err_device_alloc; |