summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWilliam Lai <b04597@freescale.com>2010-07-19 10:26:27 +0800
committerWilliam Lai <b04597@freescale.com>2010-07-19 18:33:14 +0800
commitec58bb533f2e9f89b8eb718236b856e98d5f2403 (patch)
treef09b6709c37b9df2a4637d58812a14e4d6b61d8b /sound
parentdd8eaf4b237b1c6be210a5c91068a211a3186f7d (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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-3stack-cs42888.c5
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;