aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorScott Murray <scottm@somanetworks.com>2007-04-13 15:34:26 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 19:02:40 -0700
commit03555d591d2c8ee9291db171c0d21d3c9cab04d9 (patch)
tree9017400c9c5b6f92cf1d74d3a979c2b9657c2815 /drivers/pci/hotplug
parentac1f0e9923356652f21756526e194a4a1a37dd38 (diff)
PCI: ZT5550 CPCI Hotplug driver fix
cc: Philip Guo <pg@cs.stanford.edu> Here's a small patch against the current git tree for the ZT5550 CPCI hotplug driver to fix an issue with port freeing that Philip Guo found. Signed-off-by: Scott Murray <scottm@somanetworks.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpcihp_zt5550.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index 1c12e917109..41f6a8d79c8 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -296,13 +296,17 @@ static struct pci_driver zt5550_hc_driver = {
static int __init zt5550_init(void)
{
struct resource* r;
+ int rc;
info(DRIVER_DESC " version: " DRIVER_VERSION);
r = request_region(ENUM_PORT, 1, "#ENUM hotswap signal register");
if(!r)
return -EBUSY;
- return pci_register_driver(&zt5550_hc_driver);
+ rc = pci_register_driver(&zt5550_hc_driver);
+ if(rc < 0)
+ release_region(ENUM_PORT, 1);
+ return rc;
}
static void __exit