[PATCH] acpiphp: fix missing acpiphp_glue_exit()

From: Akinobu Mita
Date: Sat Oct 28 2006 - 14:50:43 EST


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)

Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Cc: Kristen Carlson Accardi <kristen.c.accardi@xxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

drivers/pci/hotplug/acpiphp_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: work-fault-inject/drivers/pci/hotplug/acpiphp_core.c
===================================================================
--- work-fault-inject.orig/drivers/pci/hotplug/acpiphp_core.c
+++ work-fault-inject/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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/