Skip to content

Commit

Permalink
ALSA: sound/isa/sscape.c: add missing resource-release code
Browse files Browse the repository at this point in the history
At the point of this error-handling code, both regions and the dma have
been allocated, so free it as done in previous and subsequent
error-handling code.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Julia Lawall authored and Takashi Iwai committed Apr 10, 2012
1 parent 156d14d commit 38be95d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/isa/sscape.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,15 @@ static int __devinit create_sscape(int dev, struct snd_card *card)
irq_cfg = get_irq_config(sscape->type, irq[dev]);
if (irq_cfg == INVALID_IRQ) {
snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", irq[dev]);
return -ENXIO;
err = -ENXIO;
goto _release_dma;
}

mpu_irq_cfg = get_irq_config(sscape->type, mpu_irq[dev]);
if (mpu_irq_cfg == INVALID_IRQ) {
snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", mpu_irq[dev]);
return -ENXIO;
err = -ENXIO;
goto _release_dma;
}

/*
Expand Down

0 comments on commit 38be95d

Please sign in to comment.