diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-01-04 15:29:49 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-04 18:30:01 (GMT) |
commit | ecbec242961ec66e900b5649ded1e40f5d5edc41 (patch) | |
tree | 76c0e1c156e9ee0132049f93fe9b7e9e46fa0ba4 /sound | |
parent | 7f50548abb5454bd82c25aae15f0a3bf6a530f46 (diff) | |
download | linux-fsl-qoriq-ecbec242961ec66e900b5649ded1e40f5d5edc41.tar.xz |
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: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/ac97.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 69bd0ac..a1bbe16 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -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) |