From: sashiko-bot@kernel.org
To: hpp.iscas <hppiscas@163.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: eswin: Publish the platform driver's OF alias
Date: Sat, 05 Sep 2026 13:53:55 +0000 [thread overview]
Message-ID: <20260905135356.2ECC61F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260905134251.67210-1-hppiscas@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Resource leak of `perst` reset controls on the probe error path due to incorrect label ordering.
--
commit 086b34d1058711efceb6e05d5c137e933d166d8c
Author: hpp.iscas <hppiscas@163.com>
PCI: eswin: Publish the platform driver's OF alias
The ESWIN PCIe host controller is a platform driver matched through
eswin_pcie_of_match. PCIE_ESWIN is tristate, but the table is not
published for OF module autoloading.
Publish this platform-device table. Do not change the RISC-V host
initialization sequence or PCI device matching.
> diff --git a/drivers/pci/controller/dwc/pcie-eswin.c b/drivers/pci/controller/dwc/pcie-eswin.c
> index ce8d64f8a3957..1bb44696057e4 100644
> --- a/drivers/pci/controller/dwc/pcie-eswin.c
> +++ b/drivers/pci/controller/dwc/pcie-eswin.c
> @@ -388,6 +388,7 @@ static const struct of_device_id eswin_pcie_of_match[] = {
> { .compatible = "eswin,eic7700-pcie", .data = &eswin_eic7700_data },
> {}
> };
> +MODULE_DEVICE_TABLE(of, eswin_pcie_of_match);
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing this file I
noticed a pre-existing issue in eswin_pcie_probe() regarding error handling.
When dw_pcie_host_init() fails, execution jumps to err_init:
ret = dw_pcie_host_init(&pci->pp);
if (ret) {
dev_err(dev, "Failed to init host\n");
goto err_init;
}
Because err_init is positioned after err_pm_runtime_put, it completely skips
the loop that releases the exclusive perst reset controls:
err_pm_runtime_put:
list_for_each_entry_safe(port, tmp, &pcie->ports, list) {
reset_control_put(port->perst);
list_del(&port->list);
}
err_init:
pm_runtime_put(dev);
Does this leak the perst reset controls?
Because they are requested exclusively via of_reset_control_get_exclusive(),
would subsequent attempts to reprobe the driver (e.g. module reload) fail to
acquire the reset controls until a full system reboot?
>
> static struct platform_driver eswin_pcie_driver = {
> .probe = eswin_pcie_probe,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260905134251.67210-1-hppiscas@163.com?part=1
next prev parent reply other threads:[~2026-09-05 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 13:42 [PATCH] PCI: eswin: Publish the platform driver's OF alias hpp.iscas
2026-09-05 13:53 ` sashiko-bot [this message]
2026-09-05 14:46 ` Nick Huang
2026-09-05 15:55 ` Manivannan Sadhasivam
2026-09-07 10:23 ` Nick Huang
2026-09-07 10:49 ` Manivannan Sadhasivam
2026-09-05 15:59 ` Manivannan Sadhasivam
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=20260905135356.2ECC61F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=hppiscas@163.com \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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