Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: fu740: Disable pcie_aux clock if reset deassert fails
@ 2026-11-16 20:09 Jayaraj Devaraj
  2026-11-16 20:16 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jayaraj Devaraj @ 2026-11-16 20:09 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Lorenzo Pieralisi, Bjorn Helgaas
  Cc: Paul Walmsley, Greentime Hu, Samuel Holland, Rob Herring,
	Philipp Zabel, linux-pci, linux-riscv, linux-kernel,
	Jayaraj Devaraj

fu740_pcie_host_init() enables the pcie_aux clock and then returns
without disabling it if reset_control_deassert() fails, leaving the
clock enabled on the error path.

Disable the clock before returning the error.

Signed-off-by: Jayaraj Devaraj <jayarajdmit@gmail.com>
---
 drivers/pci/controller/dwc/pcie-fu740.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c
index 00ec69a09164..2355243da793 100644
--- a/drivers/pci/controller/dwc/pcie-fu740.c
+++ b/drivers/pci/controller/dwc/pcie-fu740.c
@@ -260,6 +260,7 @@ static int fu740_pcie_host_init(struct dw_pcie_rp *pp)
 	ret = reset_control_deassert(afp->rst);
 	if (ret) {
 		dev_err(dev, "unable to deassert pcie_power_up_rst_n\n");
+		clk_disable_unprepare(afp->pcie_aux);
 		return ret;
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: fu740: Disable pcie_aux clock if reset deassert fails
  2026-11-16 20:09 [PATCH] PCI: fu740: Disable pcie_aux clock if reset deassert fails Jayaraj Devaraj
@ 2026-11-16 20:16 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-16 20:16 UTC (permalink / raw)
  To: Jayaraj Devaraj; +Cc: linux-pci

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] PCI: fu740: missing Fixes trailer for fu740_pcie_host_init()
  clock leak fix
--

commit 5f0aad4ff6cb1ce1a8dd0a5f972ce2e2d06643f0
Author: Jayaraj Devaraj <jayarajdmit@gmail.com>

> PCI: fu740: Disable pcie_aux clock if reset deassert fails
>
> fu740_pcie_host_init() enables the pcie_aux clock and then returns
> without disabling it if reset_control_deassert() fails, leaving the
> clock enabled on the error path.
>
> Disable the clock before returning the error.
>
> Signed-off-by: Jayaraj Devaraj <jayarajdmit@gmail.com>

[Severity: Low]
This fixes a clock enable leak on the error path introduced with the
driver.  Should it include:

  Fixes: e7e21b3a339b ("PCI: fu740: Add SiFive FU740 PCIe host controller driver")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116200912.156500-1-jayarajdmit@gmail.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-16 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 20:09 [PATCH] PCI: fu740: Disable pcie_aux clock if reset deassert fails Jayaraj Devaraj
2026-11-16 20:16 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox