Re: [PATCH] ibmasm: add missing pci_enable_device()

From: Jeff Garzik
Date: Tue Aug 24 2004 - 19:48:38 EST


Linux Kernel Mailing List wrote:
diff -Nru a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
--- a/drivers/misc/ibmasm/module.c 2004-08-24 15:25:05 -07:00
+++ b/drivers/misc/ibmasm/module.c 2004-08-24 15:25:05 -07:00
@@ -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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/