Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Scott Murray and committed by
Greg Kroah-Hartman
03555d59 ac1f0e99

+5 -1
+5 -1
drivers/pci/hotplug/cpcihp_zt5550.c
··· 296 296 static int __init zt5550_init(void) 297 297 { 298 298 struct resource* r; 299 + int rc; 299 300 300 301 info(DRIVER_DESC " version: " DRIVER_VERSION); 301 302 r = request_region(ENUM_PORT, 1, "#ENUM hotswap signal register"); 302 303 if(!r) 303 304 return -EBUSY; 304 305 305 - return pci_register_driver(&zt5550_hc_driver); 306 + rc = pci_register_driver(&zt5550_hc_driver); 307 + if(rc < 0) 308 + release_region(ENUM_PORT, 1); 309 + return rc; 306 310 } 307 311 308 312 static void __exit