Skip to contentSkip to conversation

ibmasm: add missing pci_enable_device()

PATCH Jeff Garzik 1 participant 1 message Aug 25, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

drivers/misc/ibmasm/module.c line 69

Quoted 12 lines · Linux Kernel Mailing List

diff -Nru a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c

drivers/misc/ibmasm/module.c +5 -0
@@ -62,10 +62,17 @@
 	int result = -ENOMEM;
 	struct service_processor *sp;
 
+	if (pci_enable_device(pdev)) {
+		printk(KERN_ERR "%s: can't enable PCI device at %s\n",
+			DRIVER_NAME, pci_name(pdev));
+		return -ENODEV;
+	}

Another [minor] bug in this series of changes: you should propagate the return value of pci_enable_device(), not make up your own.

Jeff