ACPI: Correct return value of acpi_dev_resource_address_space()
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 27 Oct 2014 05:21:35 +0000 (13:21 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 16 Dec 2014 13:08:14 +0000 (14:08 +0100)
Change acpi_dev_resource_address_space() to return failure if the
acpi_resource structure can't be converted to an ACPI address64
structure, so caller could correctly detect failure.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Len Brown <lenb@kernel.org>
Link: http://lkml.kernel.org/r/1414387308-27148-6-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/acpi/resource.c

index 2ba8f02ced3637e0b1431bb16049b2f238069ee2..782a0d15c25fa7b89900a06a3bb8eb194ddcd032 100644 (file)
@@ -200,7 +200,7 @@ bool acpi_dev_resource_address_space(struct acpi_resource *ares,
 
        status = acpi_resource_to_address64(ares, &addr);
        if (ACPI_FAILURE(status))
-               return true;
+               return false;
 
        res->start = addr.minimum;
        res->end = addr.maximum;