mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 10:11:38 -04:00
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: 5cbc7d3e31 ("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
This commit is contained in:
committed by
Manivannan Sadhasivam
parent
8f0b4cce44
commit
b79e0875fe
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user