acpiphp: fix missing acpiphp_glue_exit()

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>
This commit is contained in:
Akinobu Mita 2006-10-30 13:08:04 -08:00 committed by Greg Kroah-Hartman
parent 467c442f09
commit 0a9dee2739

View 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;