Commit b417d40b authored by Yi Yang's avatar Yi Yang Committed by Len Brown

ACPICA: Return status from global init function

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: default avatarYi Yang <yi.y.yang@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent a6f30539
...@@ -677,14 +677,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type) ...@@ -677,14 +677,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type)
* *
* PARAMETERS: None * PARAMETERS: None
* *
* RETURN: None * RETURN: Status
* *
* DESCRIPTION: Init library globals. All globals that require specific * DESCRIPTION: Init library globals. All globals that require specific
* initialization should be initialized here! * initialization should be initialized here!
* *
******************************************************************************/ ******************************************************************************/
void acpi_ut_init_globals(void) acpi_status acpi_ut_init_globals(void)
{ {
acpi_status status; acpi_status status;
u32 i; u32 i;
...@@ -695,7 +695,7 @@ void acpi_ut_init_globals(void) ...@@ -695,7 +695,7 @@ void acpi_ut_init_globals(void)
status = acpi_ut_create_caches(); status = acpi_ut_create_caches();
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return; return_ACPI_STATUS(status);
} }
/* Mutex locked flags */ /* Mutex locked flags */
...@@ -772,7 +772,7 @@ void acpi_ut_init_globals(void) ...@@ -772,7 +772,7 @@ void acpi_ut_init_globals(void)
acpi_gbl_display_final_mem_stats = FALSE; acpi_gbl_display_final_mem_stats = FALSE;
#endif #endif
return_VOID; return_ACPI_STATUS(AE_OK);
} }
ACPI_EXPORT_SYMBOL(acpi_dbg_level) ACPI_EXPORT_SYMBOL(acpi_dbg_level)
......
...@@ -81,7 +81,12 @@ acpi_status __init acpi_initialize_subsystem(void) ...@@ -81,7 +81,12 @@ acpi_status __init acpi_initialize_subsystem(void)
/* Initialize all globals used by the subsystem */ /* 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 */ /* Create the default mutex objects */
......
...@@ -110,7 +110,7 @@ struct acpi_pkg_info { ...@@ -110,7 +110,7 @@ struct acpi_pkg_info {
/* /*
* utglobal - Global data structures and procedures * 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) #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment