Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [bug report] PCI: mediatek: Add controller support for MT2712 and MT7622
Date: Fri, 25 Aug 2017 15:27:43 +0300	[thread overview]
Message-ID: <20170825113431.q7lpvmljar43xzpg@mwanda> (raw)

Hello Ryder Lee,

The patch 6a48aa410571: "PCI: mediatek: Add controller support for
MT2712 and MT7622" from Aug 10, 2017, leads to the following static
checker warning:

	drivers/pci/host/pcie-mediatek.c:453 mtk_pcie_init_irq_domain()
	warn: passing zero to 'PTR_ERR'

	drivers/pci/host/pcie-mediatek.c:460 mtk_pcie_init_irq_domain()
	warn: passing zero to 'PTR_ERR'

drivers/pci/host/pcie-mediatek.c
   443  static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,
   444                                      struct device_node *node)
   445  {
   446          struct device *dev = port->pcie->dev;
   447          struct device_node *pcie_intc_node;
   448  
   449          /* Setup INTx */
   450          pcie_intc_node = of_get_next_child(node, NULL);
   451          if (!pcie_intc_node) {
   452                  dev_err(dev, "no PCIe Intc node found\n");
   453                  return PTR_ERR(pcie_intc_node);
                               ^^^^^^^^^^^^^^^^^^^^^^^
This is a complicated way of returning 0, but I'm not sure what we
should actually be returning here.

   454          }
   455  
   456          port->irq_domain = irq_domain_add_linear(pcie_intc_node, INTX_NUM,
   457                                                   &intx_domain_ops, port);
   458          if (!port->irq_domain) {
   459                  dev_err(dev, "failed to get INTx IRQ domain\n");
   460                  return PTR_ERR(port->irq_domain);
                               ^^^^^^^^^^^^^^^^^^^^^^^^
Also zero.

   461          }
   462  
   463          return 0;
   464  }

regards,
dan carpenter

             reply	other threads:[~2017-08-25 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 12:27 Dan Carpenter [this message]
2017-08-25 12:55 ` [bug report] PCI: mediatek: Add controller support for MT2712 and MT7622 Ryder Lee

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=20170825113431.q7lpvmljar43xzpg@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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