Skip to contentSkip to conversation

acpiphp: fix missing acpiphp_glue_exit()

PATCH New Akinobu Mita 1 participant 1 message Oct 28, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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)

Cc Greg Kroah-Hartman <[email protected]>
Cc Kristen Carlson Accardi <[email protected]>
 drivers/pci/hotplug/acpiphp_core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/hotplug/acpiphp_core.c +3 -1
Index: 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;