diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2014-11-14 14:21:53 -0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-12-26 16:24:27 -0700 |
commit | c51d411fe1e5f5f378b4db6b10dbe89e2e8688e4 (patch) | |
tree | 90ad0e11e65d7b1a46e49b5264b97b2b64e7e7e0 /drivers/pci/host | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) | |
download | linux-stable-c51d411fe1e5f5f378b4db6b10dbe89e2e8688e4.tar.gz linux-stable-c51d411fe1e5f5f378b4db6b10dbe89e2e8688e4.tar.bz2 linux-stable-c51d411fe1e5f5f378b4db6b10dbe89e2e8688e4.zip |
PCI: rcar: Fix error handling of irq_of_parse_and_map()
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating
failure, so testing for negative result never works.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 748786c402fc..b25874484833 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -757,7 +757,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev, goto err_map_reg; i = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (i < 0) { + if (!i) { dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n"); err = -ENOENT; goto err_map_reg; @@ -765,7 +765,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev, pcie->msi.irq1 = i; i = irq_of_parse_and_map(pdev->dev.of_node, 1); - if (i < 0) { + if (!i) { dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n"); err = -ENOENT; goto err_map_reg; |