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

[Xen-changelog] [xen master] ACPI / table: Replace '1' with specific error return values



commit f025e6ddde98819083aadee11f776180cf5c6dce
Author:     Hanjun Guo <hanjun.guo@xxxxxxxxxx>
AuthorDate: Wed Sep 9 16:26:37 2015 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 9 16:26:37 2015 +0200

    ACPI / table: Replace '1' with specific error return values
    
    After commit 7f8f97c3cc (ACPI: acpi_table_parse() now returns
    success/fail, not count), acpi_table_parse() returns '1' when it is
    unable to find the table, but it should return a negative error code
    in that case.  Make it return -ENODEV instead.
    
    Fix the same problem in acpi_table_init() analogously.
    
    Signed-off-by: Hanjun Guo <hanjun.guo@xxxxxxxxxx>
    [rjw: Subject and changelog]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    [Linux commit 95df812dbdc350bfcf31e247e9100c378a472480]
    Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
 xen/drivers/acpi/tables.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index 6085fda..60c4ab1 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -290,7 +290,7 @@ int __init acpi_table_parse(char *id, acpi_table_handler 
handler)
        if (table) {
                return handler(table);
        } else
-               return 1;
+               return -ENODEV;
 }
 
 /* 
@@ -333,7 +333,7 @@ int __init acpi_table_init(void)
 
        status = acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0);
        if (ACPI_FAILURE(status))
-               return 1;
+               return -EINVAL;
 
        check_multiple_madt();
        return 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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