Skip to content

Commit b79e087

Browse files
vingu-linaroMani-Sadhasivam
authored andcommitted
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: 5cbc7d3 ("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
1 parent 8f0b4cc commit b79e087

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/pci/controller/dwc/pcie-nxp-s32g.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ static int s32g_pcie_parse_ports(struct device *dev, struct s32g_pcie *s32g_pp)
282282

283283
ret = s32g_pcie_parse_port(s32g_pp, of_port);
284284
if (ret)
285-
goto err_port;
285+
break;
286286
}
287287

288-
err_port:
289-
list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
290-
list_del(&port->list);
288+
if (ret)
289+
list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
290+
list_del(&port->list);
291291

292292
return ret;
293293
}

0 commit comments

Comments
 (0)