From kristen.c.accardi@intel.com Fri Apr 13 15:34:21 2007 From: Scott Murray Date: Fri, 13 Apr 2007 15:34:26 -0700 Subject: [patch 20/21] PCI: ZT5550 CPCI Hotplug driver fix To: gregkh@suse.de Message-ID: <20070413223421.071338032@intel.com> Content-Disposition: inline; filename=zt5550-cpci-hotplug-driver-fix From: Scott Murray cc: Philip Guo 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 Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/cpcihp_zt5550.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -296,13 +296,17 @@ static struct pci_driver zt5550_hc_drive 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