* [PATCH] acpi/processor: prevent loading module on failures
@ 2006-11-14 21:21 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2006-11-14 21:21 UTC (permalink / raw)
To: linux-kernel; +Cc: Len Brown
This patch makes loading processor.ko fail when an error happens.
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
drivers/acpi/processor_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: work-fault-inject/drivers/acpi/processor_core.c
===================================================================
--- work-fault-inject.orig/drivers/acpi/processor_core.c
+++ work-fault-inject/drivers/acpi/processor_core.c
@@ -901,13 +901,13 @@ static int __init acpi_processor_init(vo
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();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-14 21:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 21:21 [PATCH] acpi/processor: prevent loading module on failures Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).