From: Akinobu Mita Date: Tue, 19 Dec 2006 20:56:10 +0000 (-0800) Subject: ACPI: prevent processor module from loading on failures X-Git-Tag: v2.6.20-rc2~6^2~3^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83822fc9e6ad2e0f3799174f7c6ad3aa285b9488;p=linux-2.6 ACPI: prevent processor module from loading on failures Make loading processor.ko fail when an error happens. Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 1908e0d202..22eb05efa6 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -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();