Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv16068/pci
Modified Files:
azt3328.c cs4281.c ens1370.c es1938.c es1968.c sonicvibes.c
via82xx.c
Log Message:
fixed the wrong order of object destruction:
a released object is referred after the *_free() call.
Index: azt3328.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/azt3328.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- azt3328.c 12 Aug 2003 14:10:12 -0000 1.2
+++ azt3328.c 14 Aug 2003 11:05:38 -0000 1.3
@@ -1347,38 +1347,38 @@
chip->codec_port = pci_resource_start(pci, 0);
if ((chip->res_codec_port = request_region(chip->codec_port, 0x80, "Aztech
AZF3328 I/O")) == NULL) {
- snd_azf3328_free(chip);
snd_printk("unable to grab I/O port at 0x%lx-0x%lx\n",
chip->codec_port, chip->codec_port + 0x80 - 1);
+ snd_azf3328_free(chip);
return -EBUSY;
}
chip->io2_port = pci_resource_start(pci, 1);
if ((chip->res_io2_port = request_region(chip->io2_port, 0x08, "Aztech AZF3328
I/O 2")) == NULL) {
- snd_azf3328_free(chip);
snd_printk("unable to grab I/O 2 port at 0x%lx-0x%lx\n",
chip->io2_port, chip->io2_port + 0x08 - 1);
+ snd_azf3328_free(chip);
return -EBUSY;
}
chip->mpu_port = pci_resource_start(pci, 2);
if ((chip->res_mpu_port = request_region(chip->mpu_port, 0x04, "Aztech AZF3328
MPU401")) == NULL) {
- snd_azf3328_free(chip);
snd_printk("unable to grab MPU401 port at 0x%lx-0x%lx\n",
chip->mpu_port, chip->mpu_port + 0x04 - 1);
+ snd_azf3328_free(chip);
return -EBUSY;
}
chip->synth_port = pci_resource_start(pci, 3);
if ((chip->res_synth_port = request_region(chip->synth_port, 0x08, "Aztech
AZF3328 OPL3")) == NULL) {
- snd_azf3328_free(chip);
snd_printk("unable to grab OPL3 port at 0x%lx-0x%lx\n",
chip->synth_port, chip->synth_port + 0x08 - 1);
+ snd_azf3328_free(chip);
return -EBUSY;
}
chip->mixer_port = pci_resource_start(pci, 4);
if ((chip->res_mixer_port = request_region(chip->mixer_port, 0x40, "Aztech
AZF3328 Mixer")) == NULL) {
- snd_azf3328_free(chip);
snd_printk("unable to grab mixer port at 0x%lx-0x%lx\n",
chip->mixer_port, chip->mixer_port + 0x40 - 1);
+ snd_azf3328_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ,
card->shortname, (void *)chip)) {
- snd_azf3328_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_azf3328_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
@@ -1499,8 +1499,8 @@
if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_MPU401,
chip->mpu_port, 1, pci->irq, 0,
&chip->rmidi)) < 0) {
- snd_card_free(card);
snd_printk("azf3328: no MPU-401 device at 0x%lx?\n", chip->mpu_port);
+ snd_card_free(card);
return err;
}
Index: cs4281.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cs4281.c 12 Aug 2003 14:10:12 -0000 1.43
+++ cs4281.c 14 Aug 2003 11:05:38 -0000 1.44
@@ -1439,18 +1439,18 @@
chip->dual_codec = dual_codec;
if ((chip->ba0_res = request_mem_region(chip->ba0_addr, CS4281_BA0_SIZE,
"CS4281 BA0")) == NULL) {
- snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n",
chip->ba0_addr, chip->ba0_addr + CS4281_BA0_SIZE - 1);
+ snd_cs4281_free(chip);
return -ENOMEM;
}
if ((chip->ba1_res = request_mem_region(chip->ba1_addr, CS4281_BA1_SIZE,
"CS4281 BA1")) == NULL) {
- snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n",
chip->ba1_addr, chip->ba1_addr + CS4281_BA1_SIZE - 1);
+ snd_cs4281_free(chip);
return -ENOMEM;
}
if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ,
"CS4281", (void *)chip)) {
- snd_cs4281_free(chip);
snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
+ snd_cs4281_free(chip);
return -ENOMEM;
}
chip->irq = pci->irq;
Index: ens1370.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- ens1370.c 12 Aug 2003 14:10:12 -0000 1.47
+++ ens1370.c 14 Aug 2003 11:05:38 -0000 1.48
@@ -1902,20 +1902,20 @@
ensoniq->irq = -1;
ensoniq->port = pci_resource_start(pci, 0);
if ((ensoniq->res_port = request_region(ensoniq->port, 0x40, "Ensoniq
AudioPCI")) == NULL) {
- snd_ensoniq_free(ensoniq);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", ensoniq->port,
ensoniq->port + 0x40 - 1);
+ snd_ensoniq_free(ensoniq);
return -EBUSY;
}
if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ,
"Ensoniq AudioPCI", (void *)ensoniq)) {
- snd_ensoniq_free(ensoniq);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_ensoniq_free(ensoniq);
return -EBUSY;
}
ensoniq->irq = pci->irq;
#ifdef CHIP1370
if ((ensoniq->bugbuf = snd_malloc_pci_pages(pci, 16, &ensoniq->bugbuf_addr))
== NULL) {
- snd_ensoniq_free(ensoniq);
snd_printk("unable to allocate space for phantom area - bugbuf\n");
+ snd_ensoniq_free(ensoniq);
return -EBUSY;
}
#endif
Index: es1938.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1938.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- es1938.c 12 Aug 2003 14:10:12 -0000 1.26
+++ es1938.c 14 Aug 2003 11:05:38 -0000 1.27
@@ -1413,37 +1413,37 @@
chip->pci = pci;
chip->io_port = pci_resource_start(pci, 0);
if ((chip->res_io_port = request_region(chip->io_port, 8, "ESS Solo-1")) ==
NULL) {
- snd_es1938_free(chip);
snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port,
chip->io_port + 8 - 1);
+ snd_es1938_free(chip);
return -EBUSY;
}
chip->sb_port = pci_resource_start(pci, 1);
if ((chip->res_sb_port = request_region(chip->sb_port, 0x10, "ESS Solo-1 SB"))
== NULL) {
- snd_es1938_free(chip);
snd_printk("unable to grab SB region 0x%lx-0x%lx\n", chip->sb_port,
chip->sb_port + 0x10 - 1);
+ snd_es1938_free(chip);
return -EBUSY;
}
chip->vc_port = pci_resource_start(pci, 2);
if ((chip->res_vc_port = request_region(chip->vc_port, 0x10, "ESS Solo-1 VC
(DMA)")) == NULL) {
- snd_es1938_free(chip);
snd_printk("unable to grab VC (DMA) region 0x%lx-0x%lx\n",
chip->vc_port, chip->vc_port + 0x10 - 1);
+ snd_es1938_free(chip);
return -EBUSY;
}
chip->mpu_port = pci_resource_start(pci, 3);
if ((chip->res_mpu_port = request_region(chip->mpu_port, 4, "ESS Solo-1
MIDI")) == NULL) {
- snd_es1938_free(chip);
snd_printk("unable to grab MIDI region 0x%lx-0x%lx\n", chip->mpu_port,
chip->mpu_port + 4 - 1);
+ snd_es1938_free(chip);
return -EBUSY;
}
chip->game_port = pci_resource_start(pci, 4);
if ((chip->res_game_port = request_region(chip->game_port, 4, "ESS Solo-1
GAME")) == NULL) {
- snd_es1938_free(chip);
snd_printk("unable to grab GAME region 0x%lx-0x%lx\n",
chip->game_port, chip->game_port + 4 - 1);
+ snd_es1938_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ,
"ES1938", (void *)chip)) {
- snd_es1938_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_es1938_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
Index: es1968.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1968.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- es1968.c 12 Aug 2003 14:10:12 -0000 1.51
+++ es1968.c 14 Aug 2003 11:05:38 -0000 1.52
@@ -2551,14 +2551,14 @@
chip->io_port = pci_resource_start(pci, 0);
if ((chip->res_io_port = request_region(chip->io_port, 0x100, "ESS Maestro"))
== NULL) {
- snd_es1968_free(chip);
snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port,
chip->io_port + 0x100 - 1);
+ snd_es1968_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ,
"ESS Maestro", (void*)chip)) {
- snd_es1968_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_es1968_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
Index: sonicvibes.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/sonicvibes.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- sonicvibes.c 12 Aug 2003 14:10:13 -0000 1.25
+++ sonicvibes.c 14 Aug 2003 11:05:38 -0000 1.26
@@ -1264,32 +1264,32 @@
sonic->irq = -1;
sonic->sb_port = pci_resource_start(pci, 0);
if ((sonic->res_sb_port = request_region(sonic->sb_port, 0x10, "S3 SonicVibes
SB")) == NULL) {
- snd_sonicvibes_free(sonic);
snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port,
sonic->sb_port + 0x10 - 1);
+ snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->enh_port = pci_resource_start(pci, 1);
if ((sonic->res_enh_port = request_region(sonic->enh_port, 0x10, "S3
SonicVibes Enhanced")) == NULL) {
- snd_sonicvibes_free(sonic);
snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n",
sonic->enh_port, sonic->enh_port + 0x10 - 1);
+ snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->synth_port = pci_resource_start(pci, 2);
if ((sonic->res_synth_port = request_region(sonic->synth_port, 4, "S3
SonicVibes Synth")) == NULL) {
- snd_sonicvibes_free(sonic);
snd_printk("unable to grab synth port at 0x%lx-0x%lx\n",
sonic->synth_port, sonic->synth_port + 4 - 1);
+ snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->midi_port = pci_resource_start(pci, 3);
if ((sonic->res_midi_port = request_region(sonic->midi_port, 4, "S3 SonicVibes
Midi")) == NULL) {
- snd_sonicvibes_free(sonic);
snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n",
sonic->midi_port, sonic->midi_port + 4 - 1);
+ snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->game_port = pci_resource_start(pci, 4);
if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3
SonicVibes", (void *)sonic)) {
- snd_magic_kfree(sonic);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_sonicvibes_free(sonic);
return -EBUSY;
}
sonic->irq = pci->irq;
Index: via82xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- via82xx.c 12 Aug 2003 14:10:14 -0000 1.45
+++ via82xx.c 14 Aug 2003 11:05:38 -0000 1.46
@@ -1897,14 +1897,14 @@
chip->port = pci_resource_start(pci, 0);
if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
- snd_via82xx_free(chip);
snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->port,
chip->port + 256 - 1);
+ snd_via82xx_free(chip);
return -EBUSY;
}
if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ,
card->driver, (void *)chip)) {
- snd_via82xx_free(chip);
snd_printk("unable to grab IRQ %d\n", pci->irq);
+ snd_via82xx_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog