[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1480578107-12512-1-git-send-email-majun258@huawei.com>
Date: Thu, 1 Dec 2016 15:41:47 +0800
From: Majun <majun258@...wei.com>
To: <linux-kernel@...r.kernel.org>, <marc.zyngier@....com>,
<linux-acpi@...r.kernel.org>, <robert.moore@...el.com>,
<lenb@...nel.org>, <lv.zheng@...el.com>,
<rafael.j.wysocki@...el.com>, <devel@...ica.org>,
<mark.rutland@....com>, <robh+dt@...nel.org>,
<jason@...edaemon.net>
CC: <dingtianhong@...wei.com>, <guohanjun@...wei.com>,
<majun258@...wei.com>
Subject: [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
From: MaJun <majun258@...wei.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@...wei.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
Powered by blists - more mailing lists