diff options
author | Scott Murray <scottm@somanetworks.com> | 2007-04-13 22:34:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-03 02:02:40 (GMT) |
commit | 03555d591d2c8ee9291db171c0d21d3c9cab04d9 (patch) | |
tree | 9017400c9c5b6f92cf1d74d3a979c2b9657c2815 /drivers/pci/hotplug/cpcihp_zt5550.c | |
parent | ac1f0e9923356652f21756526e194a4a1a37dd38 (diff) | |
download | linux-fsl-qoriq-03555d591d2c8ee9291db171c0d21d3c9cab04d9.tar.xz |
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/cpcihp_zt5550.c')
-rw-r--r-- | drivers/pci/hotplug/cpcihp_zt5550.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 1c12e91..41f6a8d 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 |