All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: [bug report] PCI: mediatek-gen3: Integrate new pwrctrl API
Date: Fri, 10 Apr 2026 13:14:00 +0300	[thread overview]
Message-ID: <adjNaKB5KGpl6qIp@stanley.mountain> (raw)

Hello Chen-Yu Tsai,

Commit 1a152e21940a ("PCI: mediatek-gen3: Integrate new pwrctrl API")
from Mar 24, 2026 (linux-next), leads to the following Smatch static
checker warning:

	drivers/pci/controller/pcie-mediatek-gen3.c:1226 mtk_pcie_probe()
	warn: ignoring unreachable code.

drivers/pci/controller/pcie-mediatek-gen3.c
    1202 static int mtk_pcie_probe(struct platform_device *pdev)
    1203 {
    1204         struct device *dev = &pdev->dev;
    1205         struct mtk_gen3_pcie *pcie;
    1206         struct pci_host_bridge *host;
    1207         int err;
    1208 
    1209         host = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
    1210         if (!host)
    1211                 return -ENOMEM;
    1212 
    1213         pcie = pci_host_bridge_priv(host);
    1214 
    1215         pcie->dev = dev;
    1216         pcie->soc = device_get_match_data(dev);
    1217         platform_set_drvdata(pdev, pcie);
    1218 
    1219         err = mtk_pcie_setup_irq(pcie);
    1220         if (err)
    1221                 return dev_err_probe(dev, err, "Failed to setup IRQ domains\n");
    1222 
    1223         err = pci_pwrctrl_create_devices(pcie->dev);
    1224         if (err) {
    1225                 goto err_tear_down_irq;
--> 1226                 dev_err_probe(dev, err, "failed to create pwrctrl devices\n");

The error message is unreachable.

    1227         }
    1228 
    1229         err = mtk_pcie_setup(pcie);

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter


                 reply	other threads:[~2026-04-10 10:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=adjNaKB5KGpl6qIp@stanley.mountain \
    --to=error27@gmail.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=wenst@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.