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]>
Signed-off-by: Akinobu Mita <[email protected]>
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]