summaryrefslogtreecommitdiff
path: root/sound/isa/opti9xx
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-07-18 01:37:20 +0400
committerTakashi Iwai <tiwai@suse.de>2008-07-18 13:59:40 +0400
commit82af6bc0986c5140efc875b2d91326031f0254ab (patch)
treebb6124529c7f0c5489205beb3bb031eeaf40f5f3 /sound/isa/opti9xx
parent2522d7359301efadfb5744ebd3c623c3af4a7b30 (diff)
downloadlinux-82af6bc0986c5140efc875b2d91326031f0254ab.tar.xz
ALSA: opti93x - Fix NULL dereference
Probing non-existing device causes Oops with snd-opti93x driver due to NULL access in the destructor of the error path. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Rene Herman <rene.herman@gmail.com> Acked-by: Rene Herman <rene.herman@gmail.com> Tested-by: Ingo Molnar <mingo@elte.hu> Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'sound/isa/opti9xx')
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 41c047e665ec..d20abb286124 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -688,7 +688,7 @@ static void snd_card_opti9xx_free(struct snd_card *card)
if (chip) {
#ifdef OPTi93X
struct snd_cs4231 *codec = chip->codec;
- if (codec->irq > 0) {
+ if (codec && codec->irq > 0) {
disable_irq(codec->irq);
free_irq(codec->irq, codec);
}