Skip to content

Commit

Permalink
ACPI: prevent processor module from loading on failures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Len Brown committed Dec 20, 2006
1 parent f10bb25 commit 83822fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 83822fc

Please sign in to comment.