* [PATCH] acpiphp: fix missing acpiphp_glue_exit()
@ 2006-10-28 18:50 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2006-10-28 18:50 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Kristen Carlson Accardi
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@suse.de>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-28 18:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-28 18:50 [PATCH] acpiphp: fix missing acpiphp_glue_exit() Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox