From: Fabio Estevam <fabio.estevam@nxp.com>
To: <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>,
Fabio Estevam <fabio.estevam@nxp.com>,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH 09/10] PCI: rockchip: Fix platform_get_irq() error handling
Date: Thu, 31 Aug 2017 14:52:09 -0300 [thread overview]
Message-ID: <1504201930-3617-9-git-send-email-fabio.estevam@nxp.com> (raw)
In-Reply-To: <1504201930-3617-1-git-send-email-fabio.estevam@nxp.com>
When platform_get_irq() fails we should propagate the real error
value instead of always returning -EINVAL
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/pci/host/pcie-rockchip.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 56c2423..d205381 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -962,7 +962,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
irq = platform_get_irq_byname(pdev, "sys");
if (irq < 0) {
dev_err(dev, "missing sys IRQ resource\n");
- return -EINVAL;
+ return irq;
}
err = devm_request_irq(dev, irq, rockchip_pcie_subsys_irq_handler,
@@ -975,7 +975,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
irq = platform_get_irq_byname(pdev, "legacy");
if (irq < 0) {
dev_err(dev, "missing legacy IRQ resource\n");
- return -EINVAL;
+ return irq;
}
irq_set_chained_handler_and_data(irq,
@@ -985,7 +985,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
irq = platform_get_irq_byname(pdev, "client");
if (irq < 0) {
dev_err(dev, "missing client IRQ resource\n");
- return -EINVAL;
+ return irq;
}
err = devm_request_irq(dev, irq, rockchip_pcie_client_irq_handler,
--
2.7.4
next prev parent reply other threads:[~2017-08-31 17:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 17:52 [PATCH 01/10] PCI: exynos: Fix platform_get_irq() error handling Fabio Estevam
2017-08-31 17:52 ` [PATCH 02/10] PCI: dra7xx: " Fabio Estevam
2017-09-01 6:43 ` Kishon Vijay Abraham I
2017-08-31 17:52 ` [PATCH 03/10] PCI: armada8k: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 04/10] PCI: artpec6: " Fabio Estevam
2017-09-04 14:56 ` Niklas Cassel
2017-08-31 17:52 ` [PATCH 05/10] PCI: spear13xx: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 06/10] PCI: xgene-msi: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 07/10] PCI: altera-msi: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 08/10] PCI: altera: " Fabio Estevam
2017-08-31 17:52 ` Fabio Estevam [this message]
2017-08-31 17:52 ` [PATCH 10/10] PCI: xilinx-nwl: " Fabio Estevam
2017-09-01 13:17 ` [PATCH 01/10] PCI: exynos: " Jingoo Han
2017-09-05 18:46 ` Bjorn Helgaas
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=1504201930-3617-9-git-send-email-fabio.estevam@nxp.com \
--to=fabio.estevam@nxp.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=shawn.lin@rock-chips.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).