x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries()
authorJan Beulich <jbeulich@suse.com>
Wed, 19 Sep 2012 07:26:26 +0000 (09:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 19 Sep 2012 07:26:26 +0000 (09:26 +0200)
If the legacy APIC invocation of acpi_table_parse_madt() succeeds but
the x2APIC counterpart fails, this is regarded as failure by the
function, yet its return value would indicate success.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/acpi/boot.c

index 64c76f593f121c1d50693cfd23f3dc6045cdb2c2..e518e910fc069a5b3d7668192d235e8792830adb 100644 (file)
@@ -452,7 +452,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
        } else if (count < 0 || x2count < 0) {
                printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
-               return count;
+               return count < 0 ? count : x2count;
        }
 
        count =
@@ -464,7 +464,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
        if (count < 0 || x2count < 0) {
                printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
-               return count;
+               return count < 0 ? count : x2count;
        }
        return 0;
 }