From: Krzysztof Helt <krzysztof.h1@xxxxx> Set snd_opti->irq value to -1 if the request_irq() fails to avoid freeing the irq inside the snd_card_free(). Signed-off-by: Krzysztof Helt <krzysztof.h1@xxxxx> --- sound/isa/opti9xx/opti92x-ad1848.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 5cd5553..438c1da 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -688,9 +688,9 @@ static void snd_card_opti9xx_free(struct snd_card *card) if (chip) { #ifdef OPTi93X struct snd_wss *codec = chip->codec; - if (codec && codec->irq > 0) { - disable_irq(codec->irq); - free_irq(codec->irq, codec); + if (codec && chip->irq > 0) { + disable_irq(chip->irq); + free_irq(chip->irq, codec); } #endif release_and_free_resource(chip->res_mc_base); @@ -767,6 +767,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) IRQF_DISABLED, DEV_NAME" - WSS", codec); if (error < 0) { snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); + chip->irq = -1; return error; } #endif -- 1.6.4 ---------------------------------------------------------------------- Codziennie 11 tys. ofert pracy! Sprawdz: http://link.interia.pl/f2447 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel