acpiphp: fix missing acpiphp_glue_exit()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 30 Oct 2006 21:08:04 +0000 (13:08 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:36:58 +0000 (14:36 -0800)
acpiphp_glue_exit() needs to be called to unwind when no slots found.
(It fixes data corruption when reloading acpiphp driver with no such devices)

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/acpiphp_core.c

index c57d9d5ce84e572e0ff39ada8fe81a6439d637e0..c8b6907411499d81d9f1b798be27676036e4674d 100644 (file)
@@ -303,8 +303,10 @@ static int __init init_acpi(void)
        /* read initial number of slots */
        if (!retval) {
                num_slots = acpiphp_get_num_slots();
-               if (num_slots == 0)
+               if (num_slots == 0) {
+                       acpiphp_glue_exit();
                        retval = -ENODEV;
+               }
        }
 
        return retval;