]> err.no Git - linux-2.6/commitdiff
PCI: ZT5550 CPCI Hotplug driver fix
authorScott Murray <scottm@somanetworks.com>
Fri, 13 Apr 2007 22:34:26 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 May 2007 02:02:40 +0000 (19:02 -0700)
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>
drivers/pci/hotplug/cpcihp_zt5550.c

index 1c12e9171097cba1de5dffb6f13ea605e9116d59..41f6a8d79c810ff227a89546539faba754bb7a63 100644 (file)
@@ -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