From: Akinobu Mita Date: Mon, 30 Oct 2006 21:08:04 +0000 (-0800) Subject: acpiphp: fix missing acpiphp_glue_exit() X-Git-Tag: MMI-PSA29.97-13-9~44978^2~47^2~574^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a9dee2739fd4385e83c3316e3f3bee641796638;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index c57d9d5ce84e..c8b690741149 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c @@ -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;