summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-25 03:46:38 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-25 03:46:38 +0300
commit4401555a98601a3de7cc876ceeac1d5d09f617e6 (patch)
treeb3bea4f2f24b1af026d757b9e51f3b005cb5af6c /drivers
parentcc8b8faea417bd264d23fa5d017da52b75bbdf94 (diff)
parenta13f18f59d2646754cda3662a9e215ff43e7a7d5 (diff)
downloadlinux-4401555a98601a3de7cc876ceeac1d5d09f617e6.tar.xz
Merge tag 'devicetree-fixes-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring: - Silence bogus warning for of_irq_parse_pci - Fix typo in ARM idle-states binding doc and dts files - Various minor binding documentation updates * tag 'devicetree-fixes-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: Documentation: arm: Fix typo in the idle-states bindings examples gpio: mention in DT binding doc that <name>-gpio is deprecated of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages. devicetree: bindings: Extend the bma180 bindings with bma250 info of: thermal: Mark cooling-*-level properties optional of: thermal: Fix inconsitency between cooling-*-state and cooling-*-level Docs: dt: add #msi-cells to GICv3 ITS binding of: add vendor prefix for Socionext Inc.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/of_pci_irq.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c
index 1710d9dc7fc2..2306313c0029 100644
--- a/drivers/of/of_pci_irq.c
+++ b/drivers/of/of_pci_irq.c
@@ -38,8 +38,8 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
*/
rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin);
if (rc != 0)
- return rc;
- /* No pin, exit */
+ goto err;
+ /* No pin, exit with no error message. */
if (pin == 0)
return -ENODEV;
@@ -53,8 +53,10 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
ppnode = pci_bus_to_OF_node(pdev->bus);
/* No node for host bridge ? give up */
- if (ppnode == NULL)
- return -EINVAL;
+ if (ppnode == NULL) {
+ rc = -EINVAL;
+ goto err;
+ }
} else {
/* We found a P2P bridge, check if it has a node */
ppnode = pci_device_to_OF_node(ppdev);
@@ -86,7 +88,13 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
out_irq->args[0] = pin;
laddr[0] = cpu_to_be32((pdev->bus->number << 16) | (pdev->devfn << 8));
laddr[1] = laddr[2] = cpu_to_be32(0);
- return of_irq_parse_raw(laddr, out_irq);
+ rc = of_irq_parse_raw(laddr, out_irq);
+ if (rc)
+ goto err;
+ return 0;
+err:
+ dev_err(&pdev->dev, "of_irq_parse_pci() failed with rc=%d\n", rc);
+ return rc;
}
EXPORT_SYMBOL_GPL(of_irq_parse_pci);
@@ -105,10 +113,8 @@ int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
int ret;
ret = of_irq_parse_pci(dev, &oirq);
- if (ret) {
- dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
+ if (ret)
return 0; /* Proper return code 0 == NO_IRQ */
- }
return irq_create_of_mapping(&oirq);
}