diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-04-09 12:16:35 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-10 10:42:07 +0400 |
commit | 38be95dd3d314bd393a26f6e441ae2c57ef7f064 (patch) | |
tree | 3e7f53a6d6c0c4a4ae229ad1cc0497e351bfd4ed /sound/isa/sscape.c | |
parent | 156d14da4cfc4fe01b705d6e2d22e44c0a2dbecd (diff) | |
download | linux-38be95dd3d314bd393a26f6e441ae2c57ef7f064.tar.xz |
ALSA: sound/isa/sscape.c: add missing resource-release code
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>
Diffstat (limited to 'sound/isa/sscape.c')
-rw-r--r-- | sound/isa/sscape.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index b4a6aa960f4b..8490f59709bb 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c @@ -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; } /* |