summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2026-02-02 16:10:50 +0100
committerManivannan Sadhasivam <mani@kernel.org>2026-02-03 18:26:27 +0530
commitb79e0875fe8144fcb09e4fc1cf386cb3b2262480 (patch)
tree533e595106b935c2265ba549fb5380117cb84e3e /drivers
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
PCI: s32g: Skip Root Port removal during success
Currently, s32g_pcie_parse_ports() exercises the 'err_port' path even during the success case. This results in ports getting deleted after successful parsing of Root Ports. Hence, skip the removal of Root Ports during success. Fixes: 5cbc7d3e316e ("PCI: s32g: Add NXP S32G PCIe controller driver (RC)") Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> [mani: reworded subject and description] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20260202151050.1446165-1-vincent.guittot@linaro.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/controller/dwc/pcie-nxp-s32g.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/controller/dwc/pcie-nxp-s32g.c b/drivers/pci/controller/dwc/pcie-nxp-s32g.c
index 47745749f75c..b3ec38099fa3 100644
--- a/drivers/pci/controller/dwc/pcie-nxp-s32g.c
+++ b/drivers/pci/controller/dwc/pcie-nxp-s32g.c
@@ -282,12 +282,12 @@ static int s32g_pcie_parse_ports(struct device *dev, struct s32g_pcie *s32g_pp)
ret = s32g_pcie_parse_port(s32g_pp, of_port);
if (ret)
- goto err_port;
+ break;
}
-err_port:
- list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
- list_del(&port->list);
+ if (ret)
+ list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
+ list_del(&port->list);
return ret;
}