]> err.no Git - linux-2.6/commitdiff
ACPI: prevent processor module from loading on failures
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 19 Dec 2006 20:56:10 +0000 (12:56 -0800)
committerLen Brown <len.brown@intel.com>
Wed, 20 Dec 2006 05:33:07 +0000 (00:33 -0500)
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>
drivers/acpi/processor_core.c

index 1908e0d202226a47b0f839439a84f599d91649b1..22eb05efa64c64c9f4ff8c1981e91cf6a955c3db 100644 (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();