ACPI: prevent processor module from loading on failures

Make loading processor.ko fail when an error happens.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Akinobu Mita 2006-12-19 12:56:10 -08:00 committed by Len Brown
parent f10bb2544b
commit 83822fc9e6
1 changed files with 2 additions and 2 deletions

View File

@ -901,13 +901,13 @@ static int __init acpi_processor_init(void)
acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
if (!acpi_processor_dir)
return 0;
return -ENOMEM;
acpi_processor_dir->owner = THIS_MODULE;
result = acpi_bus_register_driver(&acpi_processor_driver);
if (result < 0) {
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
return 0;
return result;
}
acpi_processor_install_hotplug_notify();