From: Fabio Estevam <festevam@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, Fabio Estevam <festevam@gmail.com>,
Michal Simek <michal.simek@xilinx.com>
Subject: [PATCH 5/5] PCI: xilinx-nwl: Fix platform_get_irq() error handling
Date: Sat, 14 Oct 2017 19:07:31 -0300 [thread overview]
Message-ID: <1508018851-9272-5-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 -EINVAL.
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/pci/host/pcie-xilinx-nwl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c
index 65dea98..b896167 100644
--- a/drivers/pci/host/pcie-xilinx-nwl.c
+++ b/drivers/pci/host/pcie-xilinx-nwl.c
@@ -591,7 +591,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)
msi->irq_msi1 = platform_get_irq_byname(pdev, "msi1");
if (msi->irq_msi1 < 0) {
dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi1);
- ret = -EINVAL;
+ ret = msi->irq_msi1;
goto err;
}
@@ -602,7 +602,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie)
msi->irq_msi0 = platform_get_irq_byname(pdev, "msi0");
if (msi->irq_msi0 < 0) {
dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi0);
- ret = -EINVAL;
+ ret = msi->irq_msi0;
goto err;
}
@@ -735,7 +735,7 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie)
if (pcie->irq_misc < 0) {
dev_err(dev, "failed to get misc IRQ %d\n",
pcie->irq_misc);
- return -EINVAL;
+ return pcie->irq_misc;
}
err = devm_request_irq(dev, pcie->irq_misc,
--
2.7.4
next prev 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 ` [PATCH 4/5] PCI: tango: Fix platform_get_irq() error handling Fabio Estevam
2017-10-16 9:09 ` 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 ` Fabio Estevam [this message]
2017-10-17 8:55 ` [PATCH 5/5] PCI: xilinx-nwl: " 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-5-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=michal.simek@xilinx.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).