From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967AbcHRLDa (ORCPT ); Thu, 18 Aug 2016 07:03:30 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58626 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbcHRLD2 (ORCPT ); Thu, 18 Aug 2016 07:03:28 -0400 Date: Thu, 18 Aug 2016 04:02:41 -0700 From: tip-bot for Rui Wang Message-ID: Cc: hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, mingo@kernel.org, rui.y.wang@intel.com, linux-kernel@vger.kernel.org Reply-To: rui.y.wang@intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, torvalds@linux-foundation.org, mingo@kernel.org, peterz@infradead.org In-Reply-To: <1471420837-31003-4-git-send-email-rui.y.wang@intel.com> References: <1471420837-31003-4-git-send-email-rui.y.wang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/ioapic: Fix setup_res() failing to get resource Git-Commit-ID: 6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a Gitweb: http://git.kernel.org/tip/6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:35 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:18 +0200 x86/ioapic: Fix setup_res() failing to get resource 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 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- drivers/acpi/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c index 2449377..8ab6d42 100644 --- a/drivers/acpi/ioapic.c +++ b/drivers/acpi/ioapic.c @@ -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)) {