Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533876

[PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Majun <majun258@huawei.com>
Newsgroups linux.kernel
Subject [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
Date Thu, 01 Dec 2016 08:50:02 +0100
Message-ID <sJuhX-PI-13@gated-at.bofh.it> (permalink)
X-Original-To <linux-kernel@vger.kernel.org>, <marc.zyngier@arm.com>, <linux-acpi@vger.kernel.org>, <robert.moore@intel.com>, <lenb@kernel.org>, <lv.zheng@intel.com>, <rafael.j.wysocki@intel.com>, <devel@acpica.org>, <mark.rutland@arm.com>, <robh+dt@kernel.org>, <jason@lakedaemon.net>
X-Mailer git-send-email 1.9.5.msysgit.1
MIME-Version 1.0
Content-Type text/plain
X-Originating-IP [10.177.249.226]
X-Cfilter-Loop Reflected
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 25
Organization linux.* mail to news gateway
X-Original-Cc <dingtianhong@huawei.com>, <guohanjun@huawei.com>, <majun258@huawei.com>
X-Original-Date Thu, 1 Dec 2016 15:41:47 +0800
X-Original-Message-ID <1480578107-12512-1-git-send-email-majun258@huawei.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1533876

Show key headers only | View raw


From: MaJun <majun258@huawei.com>

The return value 0 from acpi_register_gsi() means irq mapping failed.
So, we should process this case in else branch.

Signed-off-by: MaJun <majun258@huawei.com>
---
 drivers/acpi/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 56241eb..9918326 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -416,7 +416,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
 
 	res->flags = acpi_dev_irq_flags(triggering, polarity, shareable);
 	irq = acpi_register_gsi(NULL, gsi, triggering, polarity);
-	if (irq >= 0) {
+	if (irq > 0) {
 		res->start = irq;
 		res->end = irq;
 	} else {
-- 
1.7.12.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi Majun <majun258@huawei.com> - 2016-12-01 08:50 +0100

csiph-web