aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ac97.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2010-01-04 10:29:49 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-04 13:30:01 -0500
commitecbec242961ec66e900b5649ded1e40f5d5edc41 (patch)
tree76c0e1c156e9ee0132049f93fe9b7e9e46fa0ba4 /sound/soc/codecs/ac97.c
parent7f50548abb5454bd82c25aae15f0a3bf6a530f46 (diff)
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/soc/codecs/ac97.c')
-rw-r--r--sound/soc/codecs/ac97.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index 69bd0acc81c8..a1bbe16b7f96 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)
102 INIT_LIST_HEAD(&codec->dapm_widgets); 102 INIT_LIST_HEAD(&codec->dapm_widgets);
103 INIT_LIST_HEAD(&codec->dapm_paths); 103 INIT_LIST_HEAD(&codec->dapm_paths);
104 104
105 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
106 if (ret < 0) {
107 printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n");
108 goto err;
109 }
110
105 /* register pcms */ 111 /* register pcms */
106 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); 112 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
107 if (ret < 0) 113 if (ret < 0)