PCI: fu740: Disable pcie_aux clock if reset deassert fails
PATCH 1/1 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.
--- drivers/pci/controller/dwc/pcie-fu740.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-fu740.c +1 -0
@@ -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; }
Signature · 1 line
2.34.1
[email protected]
AI reviewThank 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 --
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 <[email protected]>
Quoted 9 lines
PCI: fu740: Disable
pcie_auxclock if reset deassert fails
fu740_pcie_host_init()enables thepcie_auxclock and then returns without disabling it ifreset_control_deassert()fails, leaving the clock enabled on the error path.Disable the clock before returning the error.
Signed-off-by Jayaraj Devaraj <[email protected]>
[Severity: Low]
This fixes a clock enable leak on the error path introduced with the driver. Should it include:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1