[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] ACPI/table: Make acpi_table_init return meaningful value



From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>

If ACPI fails to initialize tables, it should return one meaningful
value to tell the caller to diable acpi.

Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
 xen/drivers/acpi/tables.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index 822689e..1594e3b 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -330,7 +330,11 @@ static void __init check_multiple_madt(void)
 
 int __init acpi_table_init(void)
 {
-       acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0);
+       acpi_status status;
+
+       status = acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0);
+       if (ACPI_FAILURE(status))
+               return -EINVAL;
        check_multiple_madt();
        return 0;
 }
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.