From: Dan Carpenter <dan.carpenter@oracle.com>
To: sthokal@xilinx.com
Cc: linux-pci@vger.kernel.org
Subject: re: PCI: xilinx: Add Xilinx AXI PCIe Host Bridge IP driver
Date: Thu, 11 Sep 2014 15:54:40 +0300 [thread overview]
Message-ID: <20140911125440.GA17279@mwanda> (raw)
Hello Srikanth Thokala,
The patch 8961def56845: "PCI: xilinx: Add Xilinx AXI PCIe Host Bridge
IP driver" from Aug 20, 2014, leads to the following static checker
warnings:
drivers/pci/host/pcie-xilinx.c:647 xilinx_pcie_init_irq_domain() warn: passing zero to 'PTR_ERR'
drivers/pci/host/pcie-xilinx.c:655 xilinx_pcie_init_irq_domain() warn: passing zero to 'PTR_ERR'
drivers/pci/host/pcie-xilinx.c:666 xilinx_pcie_init_irq_domain() warn: passing zero to 'PTR_ERR'
drivers/pci/host/pcie-xilinx.c
637 static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port)
638 {
639 struct device *dev = port->dev;
640 struct device_node *node = dev->of_node;
641 struct device_node *pcie_intc_node;
642
643 /* Setup INTx */
644 pcie_intc_node = of_get_next_child(node, NULL);
645 if (!pcie_intc_node) {
646 dev_err(dev, "No PCIe Intc node found\n");
647 return PTR_ERR(pcie_intc_node);
^^^^^^^^^^^^^^^^^^^^^^
Returning success when a negative error code was intended.
648 }
649
650 port->irq_domain = irq_domain_add_linear(pcie_intc_node, 4,
651 &intx_domain_ops,
652 port);
653 if (!port->irq_domain) {
654 dev_err(dev, "Failed to get a INTx IRQ domain\n");
655 return PTR_ERR(port->irq_domain);
^^^^^^^^^^^^^^^^^^^^^^^^^
656 }
657
658 /* Setup MSI */
659 if (IS_ENABLED(CONFIG_PCI_MSI)) {
660 port->irq_domain = irq_domain_add_linear(node,
661 XILINX_NUM_MSI_IRQS,
662 &msi_domain_ops,
663 &xilinx_pcie_msi_chip);
664 if (!port->irq_domain) {
665 dev_err(dev, "Failed to get a MSI IRQ domain\n");
666 return PTR_ERR(port->irq_domain);
^^^^^^^^^^^^^^^^^^^^^^^^^
667 }
668
669 xilinx_pcie_enable_msi(port);
670 }
671
672 return 0;
673 }
regards,
dan carpenter
next reply other threads:[~2014-09-11 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 12:54 Dan Carpenter [this message]
2014-09-12 10:35 ` PCI: xilinx: Add Xilinx AXI PCIe Host Bridge IP driver Srikanth Thokala
2016-07-13 15:36 ` Dan Carpenter
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=20140911125440.GA17279@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-pci@vger.kernel.org \
--cc=sthokal@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).