Skip to content

Commit

Permalink
ASoC: ac97: don't call snd_soc_new_ac97_codec at probe
Browse files Browse the repository at this point in the history
It is not needed since snd_ac97_mixer() will create a new ac97 object for us.
Removing the call also fixes a memory leak since codec->ac97 is set to NULL at
the beginning of snd_ac97_mixer().

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mika Westerberg authored and Mark Brown committed Oct 13, 2010
1 parent 0054578 commit 7750752
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sound/soc/codecs/ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ static int ac97_soc_probe(struct snd_soc_codec *codec)
struct snd_ac97_template ac97_template;
int ret;

ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
if (ret < 0) {
printk(KERN_ERR "ASoC: failed to init generic ac97 glue\n");
return ret;
}

/* add codec as bus device for standard ac97 */
ret = snd_ac97_bus(codec->card->snd_card, 0, &soc_ac97_ops, NULL, &ac97_bus);
if (ret < 0)
Expand Down

0 comments on commit 7750752

Please sign in to comment.