From: Fabio Estevam <festevam@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, Fabio Estevam <festevam@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 2/5] PCI: v3-semi: Fix platform_get_irq() error handling
Date: Sat, 14 Oct 2017 19:07:28 -0300 [thread overview]
Message-ID: <1508018851-9272-2-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 -ENODEV.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/pci/host/pci-v3-semi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pci-v3-semi.c b/drivers/pci/host/pci-v3-semi.c
index a544d72..01017af 100644
--- a/drivers/pci/host/pci-v3-semi.c
+++ b/drivers/pci/host/pci-v3-semi.c
@@ -806,9 +806,9 @@ static int v3_pci_probe(struct platform_device *pdev)
/* Get and request error IRQ resource */
irq = platform_get_irq(pdev, 0);
- if (irq <= 0) {
+ if (irq < 0) {
dev_err(dev, "unable to obtain PCIv3 error IRQ\n");
- return -ENODEV;
+ return irq;
}
ret = devm_request_irq(dev, irq, v3_irq, 0,
"PCIv3 error", v3);
--
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 ` Fabio Estevam [this message]
2017-10-14 22:26 ` [PATCH 2/5] PCI: v3-semi: Fix platform_get_irq() error handling 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 ` [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-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=bhelgaas@google.com \
--cc=linus.walleij@linaro.org \
--cc=linux-pci@vger.kernel.org \
/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).