* [PATCH] ASoC: fixup oops in generic AC97 codec glue
@ 2010-01-04 15:29 Manuel Lauss
2010-01-04 18:27 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Manuel Lauss @ 2010-01-04 15:29 UTC (permalink / raw)
To: Mark Brown; +Cc: Manuel Lauss, alsa-devel, pascal
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>
---
Fixes the oops I reported here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-December/023995.html
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)
--
1.6.6.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-04 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 15:29 [PATCH] ASoC: fixup oops in generic AC97 codec glue Manuel Lauss
2010-01-04 18:27 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox