Commit 0a9dee27 authored by Akinobu Mita's avatar Akinobu Mita Committed by Greg Kroah-Hartman

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 467c442f
...@@ -303,8 +303,10 @@ static int __init init_acpi(void) ...@@ -303,8 +303,10 @@ static int __init init_acpi(void)
/* read initial number of slots */ /* read initial number of slots */
if (!retval) { if (!retval) {
num_slots = acpiphp_get_num_slots(); num_slots = acpiphp_get_num_slots();
if (num_slots == 0) if (num_slots == 0) {
acpiphp_glue_exit();
retval = -ENODEV; retval = -ENODEV;
}
} }
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment