mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sound/isa/sscape.c: add missing resource-release code
@ 2012-04-09  8:16 Julia Lawall
  2012-04-10  6:43 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2012-04-09  8:16 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

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>

---
 sound/isa/sscape.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index b4a6aa9..131dd98 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;
 	}
 
 	/*


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-10  6:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09  8:16 [PATCH] sound/isa/sscape.c: add missing resource-release code Julia Lawall
2012-04-10  6:43 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®