提交 ecbec242 编写于 作者: M Manuel Lauss 提交者: Mark Brown

ASoC: fixup oops in generic AC97 codec glue

Initialize the glue by calling snd_soc_new_ac97_codec() as is done
in other ASoC AC97 codecs.  Fixes an oops caused by dereferencing
uninitialized members in snd_soc_new_pcms().

Run-tested on Au1250.
Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 7f50548a
......@@ -102,6 +102,12 @@ static int ac97_soc_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&codec->dapm_widgets);
INIT_LIST_HEAD(&codec->dapm_paths);
ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
if (ret < 0) {
printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n");
goto err;
}
/* register pcms */
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册