mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: MaJun <majun258@huawei.com>
To: <linux-kernel@vger.kernel.org>, <marc.zyngier@arm.com>,
	<linux-acpi@vger.kernel.org>, <rjw@rjwysocki.net>,
	<lenb@kernel.org>
Cc: <dingtianhong@huawei.com>, <guohanjun@huawei.com>, <majun258@huawei.com>
Subject: [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi
Date: Wed, 12 Oct 2016 09:20:56 +0800	[thread overview]
Message-ID: <1476235256-10744-1-git-send-email-majun258@huawei.com> (raw)

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

             reply	other threads:[~2016-10-12  1:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  1:20 MaJun [this message]
2016-10-12  2:05 ` Hanjun Guo
2016-12-01  7:41 Majun
2016-12-01  7:43 ` majun (Euler7)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476235256-10744-1-git-send-email-majun258@huawei.com \
    --to=majun258@huawei.com \
    --cc=dingtianhong@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®