linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Lackorzynski <adam@l4re.org>
To: maz@kernel.org, tglx@linutronix.de
Cc: linux-arm-kernel@lists.infradead.org, linusw@kernel.org,
	kaloz@openwrt.org, khalasa@piap.pl, andrew@lunn.ch,
	gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com,
	linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com
Subject: [PATCH 3/6] irqdomain/msi: Fix return check of __irq_domain_alloc_irqs
Date: Sat,  2 Jan 2021 18:58:56 +0100	[thread overview]
Message-ID: <20210102175859.335447-3-adam@l4re.org> (raw)
In-Reply-To: <20210102175859.335447-1-adam@l4re.org>

0 is not a proper IRQ number and also indicates failure.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
---
 kernel/irq/msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 2c0c4d6d0f83..e1fe832e7161 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -416,7 +416,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
 		virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used,
 					       dev_to_node(dev), &arg, false,
 					       desc->affinity);
-		if (virq < 0) {
+		if (virq <= 0) {
 			ret = -ENOSPC;
 			if (ops->handle_error)
 				ret = ops->handle_error(domain, desc, ret);
-- 
2.30.0.rc2


  parent reply	other threads:[~2021-01-02 18:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 17:58 [PATCH 1/6] irqchip/bcm2836: Fix return check in IPI alloc Adam Lackorzynski
2021-01-02 17:58 ` [PATCH 2/6] irqchip/armada-370-xp: " Adam Lackorzynski
2021-01-02 18:24   ` Andrew Lunn
2021-01-02 17:58 ` Adam Lackorzynski [this message]
2021-01-02 17:58 ` [PATCH 4/6] irqchip/ixp4xx: Fix return check of __irq_domain_alloc_irqs Adam Lackorzynski
2021-01-02 17:58 ` [PATCH 5/6] gpiolib: " Adam Lackorzynski
2021-01-04 13:57   ` Bartosz Golaszewski
2021-01-04 14:43     ` Adam Lackorzynski
2021-01-04 15:00   ` Andy Shevchenko
2021-01-02 17:58 ` [PATCH 6/6] x86/ioapic: " Adam Lackorzynski
2021-01-27 12:03   ` Thomas Gleixner

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=20210102175859.335447-3-adam@l4re.org \
    --to=adam@l4re.org \
    --cc=andrew@lunn.ch \
    --cc=bgolaszewski@baylibre.com \
    --cc=gregory.clement@bootlin.com \
    --cc=kaloz@openwrt.org \
    --cc=khalasa@piap.pl \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).