ACPICA: Return status from global init function
authorYi Yang <yi.y.yang@intel.com>
Mon, 4 Aug 2008 02:30:09 +0000 (10:30 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 23 Oct 2008 03:14:36 +0000 (23:14 -0400)
Return status from acpi_ut_init_globals. This is used by both
the kernel subsystem and the utilities such as iASL compiler.
The function could possibly fail when the caches are initialized.
Yang Yi.

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utxface.c
include/acpi/acutils.h

index a6e71b801d2d5708642a90b76549175957aa2662..248eefc369f8cbd49a954c03893ef6a5ae9dc0a9 100644 (file)
@@ -677,14 +677,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type)
  *
  * PARAMETERS:  None
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: Init library globals.  All globals that require specific
  *              initialization should be initialized here!
  *
  ******************************************************************************/
 
-void acpi_ut_init_globals(void)
+acpi_status acpi_ut_init_globals(void)
 {
        acpi_status status;
        u32 i;
@@ -695,7 +695,7 @@ void acpi_ut_init_globals(void)
 
        status = acpi_ut_create_caches();
        if (ACPI_FAILURE(status)) {
-               return;
+               return_ACPI_STATUS(status);
        }
 
        /* Mutex locked flags */
@@ -772,7 +772,7 @@ void acpi_ut_init_globals(void)
        acpi_gbl_display_final_mem_stats = FALSE;
 #endif
 
-       return_VOID;
+       return_ACPI_STATUS(AE_OK);
 }
 
 ACPI_EXPORT_SYMBOL(acpi_dbg_level)
index f8bdadf3c32fffba99a72c5e4d905d9634331fdc..c198a4d40583e7f14fc0e1a545d496c118c98b96 100644 (file)
@@ -81,7 +81,12 @@ acpi_status __init acpi_initialize_subsystem(void)
 
        /* Initialize all globals used by the subsystem */
 
-       acpi_ut_init_globals();
+       status = acpi_ut_init_globals();
+       if (ACPI_FAILURE(status)) {
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "During initialization of globals"));
+               return_ACPI_STATUS(status);
+       }
 
        /* Create the default mutex objects */
 
index 69f8888771fffa6cdf532117ac31bc14eb5997ff..10ce81406f9caf0fd2bde30f74a41d7de19529bd 100644 (file)
@@ -110,7 +110,7 @@ struct acpi_pkg_info {
 /*
  * utglobal - Global data structures and procedures
  */
-void acpi_ut_init_globals(void);
+acpi_status acpi_ut_init_globals(void);
 
 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)