Skip to content

Commit

Permalink
x86/ioapic: Fix setup_res() failing to get resource
Browse files Browse the repository at this point in the history
acpi_dev_filter_resource_type() returns 0 on success, and 1 on failure.
A return value of zero means there's a matching resource, so we should
continue within setup_res() to get the resource.

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bhelgaas@google.com
Cc: helgaas@kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: rjw@rjwysocki.net
Cc: tony.luck@intel.com
Link: http://lkml.kernel.org/r/1471420837-31003-4-git-send-email-rui.y.wang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Rui Wang authored and Ingo Molnar committed Aug 18, 2016
1 parent 584c5c4 commit 6ab7eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/ioapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static acpi_status setup_res(struct acpi_resource *acpi_res, void *data)
struct resource_win win;

res->flags = 0;
if (acpi_dev_filter_resource_type(acpi_res, IORESOURCE_MEM) == 0)
if (acpi_dev_filter_resource_type(acpi_res, IORESOURCE_MEM))
return AE_OK;

if (!acpi_dev_resource_memory(acpi_res, res)) {
Expand Down

0 comments on commit 6ab7eba

Please sign in to comment.