Skip to content

Commit

Permalink
ASoC: fixup oops in generic AC97 codec glue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manuel Lauss authored and Mark Brown committed Jan 4, 2010
1 parent 7f50548 commit ecbec24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/codecs/ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ecbec24

Please sign in to comment.