From a8f125151fb9ee95ff290fddb80f568ddb039c48 Mon Sep 17 00:00:00 2001 From: William Lai Date: Mon, 19 Jul 2010 10:26:27 +0800 Subject: 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 --- sound/soc/imx/imx-3stack-cs42888.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.2.3