public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: trident , pci_enable_device moved
@ 2001-04-25  7:04 Marcus Meissner
  2001-04-25 11:06 ` Marcus Meissner
  0 siblings, 1 reply; 7+ messages in thread
From: Marcus Meissner @ 2001-04-25  7:04 UTC (permalink / raw)
  To: Alan Cox, linux-kernel

Hi Alan, linux-kernel,

This moves pci_enable_device() in trident.c before any PCI resource access.
Everything else appears to be ok in regards to 2.4 PCI API and return values.

Ciao, Marcus

Index: trident.c
===================================================================
RCS file: /build/mm/work/repository/linux-mm/drivers/sound/trident.c,v
retrieving revision 1.12
diff -u -r1.12 trident.c
--- trident.c	2001/04/24 09:47:13	1.12
+++ trident.c	2001/04/24 10:19:36
@@ -3309,6 +3309,9 @@
 	struct trident_card *card;
 	u8 revision;
 
+	if (pci_enable_device(pci_dev))
+	    return -ENODEV;
+
 	if (pci_set_dma_mask(pci_dev, TRIDENT_DMA_MASK)) {
 		printk(KERN_ERR "trident: architecture does not support"
 		       " 30bit PCI busmaster DMA\n");
@@ -3322,9 +3325,6 @@
 		       iobase);
 		return -ENODEV;
 	}
-
-	if (pci_enable_device(pci_dev))
-	    return -ENODEV;
 
 	if ((card = kmalloc(sizeof(struct trident_card), GFP_KERNEL)) == NULL) {
 		printk(KERN_ERR "trident: out of memory\n");

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

end of thread, other threads:[~2001-04-27  9:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-25  7:04 PATCH: trident , pci_enable_device moved Marcus Meissner
2001-04-25 11:06 ` Marcus Meissner
2001-04-25 14:49   ` Andres Salomon
2001-04-25 15:04     ` Jeff Garzik
2001-04-25 15:24       ` Andres Salomon
2001-04-25 15:35         ` Jeff Garzik
2001-04-27  9:33           ` Eric W. Biederman

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