diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-19 15:56:10 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 00:33:07 -0500 |
commit | 83822fc9e6ad2e0f3799174f7c6ad3aa285b9488 (patch) | |
tree | 06a7bd36df6b45116bb15f9bb2ef4cd4bd1446d6 /drivers/acpi | |
parent | f10bb2544bab75b3e8df15a7b51a833c78cbd77f (diff) |
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 1908e0d20222..22eb05efa64c 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -901,13 +901,13 @@ static int __init acpi_processor_init(void) | |||
901 | 901 | ||
902 | acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); | 902 | acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); |
903 | if (!acpi_processor_dir) | 903 | if (!acpi_processor_dir) |
904 | return 0; | 904 | return -ENOMEM; |
905 | acpi_processor_dir->owner = THIS_MODULE; | 905 | acpi_processor_dir->owner = THIS_MODULE; |
906 | 906 | ||
907 | result = acpi_bus_register_driver(&acpi_processor_driver); | 907 | result = acpi_bus_register_driver(&acpi_processor_driver); |
908 | if (result < 0) { | 908 | if (result < 0) { |
909 | remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); | 909 | remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); |
910 | return 0; | 910 | return result; |
911 | } | 911 | } |
912 | 912 | ||
913 | acpi_processor_install_hotplug_notify(); | 913 | acpi_processor_install_hotplug_notify(); |