summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWilliam Lai <b04597@freescale.com>2009-11-16 11:34:42 +0800
committerJustin Waters <justin.waters@timesys.com>2010-03-25 14:00:52 -0400
commit83e8321c833a40db6f715b340c331a88ff690ff8 (patch)
treeca07799318a10d7d216c5e49429da41e3add5d65 /sound
parentef0eee4c936c80e222d15c8d0f24449c4ea6adca (diff)
ENGR00118226 MX35 PM: System crashes when try to wake up from standby
The ak4647_codec is not initialized as there is no ak4647 codec existing on MX35 board. In the 31 kernel, the card and codec drivers are registered separately, and there is no check whether the codec is probed successfully or not. On MX35 board, the card is sucessfully registered, but there is no ak4647 codec. In this case, the system will crash if the system try to invoke the codec's resume function. To resolve the problem, add a check in registering the card. If the codec does not exist, give up registering the card either. Signed-off-by: William Lai <b04597@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-3stack-ak4647.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-3stack-ak4647.c b/sound/soc/imx/imx-3stack-ak4647.c
index bb3606c57fd4..fd595c137522 100644
--- a/sound/soc/imx/imx-3stack-ak4647.c
+++ b/sound/soc/imx/imx-3stack-ak4647.c
@@ -412,6 +412,12 @@ static int __init imx_3stack_asoc_init(void)
ret = platform_driver_register(&imx_3stack_ak4647_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", 3);
if (!imx_3stack_snd_device)
goto err_device_alloc;