]> xenbits.xensource.com Git - xen.git/commitdiff
ACPI: acpi_table_parse() should return handler's error code
authorBoris Ostrovsky <boris.ostrovsky@amd.com>
Tue, 5 Feb 2013 14:34:55 +0000 (15:34 +0100)
committerBoris Ostrovsky <boris.ostrovsky@amd.com>
Tue, 5 Feb 2013 14:34:55 +0000 (15:34 +0100)
Currently, the error code returned by acpi_table_parse()'s handler
is ignored. This patch will propagate handler's return value to
acpi_table_parse()'s caller.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset: 26516:32d4516a97f0
xen-unstable date: Tue Feb  5 14:18:18 UTC 2013

xen/drivers/acpi/tables.c

index 60df53aab27de365499d7995d5ca6063859343b9..c8c81e845a43af2b570ebe705d460c534504ca9f 100644 (file)
@@ -267,7 +267,7 @@ acpi_table_parse_madt(enum acpi_madt_type id,
  * @handler: handler to run
  *
  * Scan the ACPI System Descriptor Table (STD) for a table matching @id,
- * run @handler on it.  Return 0 if table found, return on if not.
+ * run @handler on it.
  */
 int acpi_table_parse(char *id, acpi_table_handler handler)
 {
@@ -282,8 +282,7 @@ int acpi_table_parse(char *id, acpi_table_handler handler)
                acpi_get_table(id, 0, &table);
 
        if (table) {
-               handler(table);
-               return 0;
+               return handler(table);
        } else
                return 1;
 }