linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, Fabio Estevam <festevam@gmail.com>,
	Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Subject: [PATCH 4/5] PCI: tango: Fix platform_get_irq() error handling
Date: Sat, 14 Oct 2017 19:07:30 -0300	[thread overview]
Message-ID: <1508018851-9272-4-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1508018851-9272-1-git-send-email-festevam@gmail.com>

When platform_get_irq() fails we should propagate the real error value
instead of always returning -ENXIO.

Cc: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/pci/host/pcie-tango.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pcie-tango.c b/drivers/pci/host/pcie-tango.c
index e23f738..5196583 100644
--- a/drivers/pci/host/pcie-tango.c
+++ b/drivers/pci/host/pcie-tango.c
@@ -272,9 +272,9 @@ static int tango_pcie_probe(struct platform_device *pdev)
 		writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset);
 
 	virq = platform_get_irq(pdev, 1);
-	if (virq <= 0) {
+	if (virq < 0) {
 		dev_err(dev, "Failed to map IRQ\n");
-		return -ENXIO;
+		return virq;
 	}
 
 	irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie);
-- 
2.7.4

  parent reply	other threads:[~2017-10-14 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14 22:07 [PATCH 1/5] PCI: aardvark: Check for platform_get_irq() error Fabio Estevam
2017-10-14 22:07 ` [PATCH 2/5] PCI: v3-semi: Fix platform_get_irq() error handling Fabio Estevam
2017-10-14 22:26   ` Linus Walleij
2017-10-14 22:07 ` [PATCH 3/5] PCI: mediatek: Check for platform_get_irq() error Fabio Estevam
2017-10-14 22:07 ` Fabio Estevam [this message]
2017-10-16  9:09   ` [PATCH 4/5] PCI: tango: Fix platform_get_irq() error handling Marc Gonzalez
2017-10-16  9:19     ` Linus Walleij
2017-10-20 22:31     ` Bjorn Helgaas
2017-10-26  6:37       ` Mason
2017-10-14 22:07 ` [PATCH 5/5] PCI: xilinx-nwl: " Fabio Estevam
2017-10-17  8:55   ` Michal Simek

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=1508018851-9272-4-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc_gonzalez@sigmadesigns.com \
    /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).