]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/opti9xx/opti92x-ad1848.c
ALSA: opti93x - Fix NULL dereference
[linux-2.6-omap-h63xx.git] / sound / isa / opti9xx / opti92x-ad1848.c
index 41c047e665ec7d62c6f85c25dbf45ce1441e901f..d20abb28612456b9fec090da7d7cb007d0f541b9 100644 (file)
@@ -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);
                }