On Tue, Jun 10, 2025 at 01:37:12PM -0300, Geraldo Nascimento wrote: > After almost 30 days of battling with RK3399 buggy PCIe on my Rock Pi > N10 through trial-and-error debugging, I finally got positive results > with enumeration on the PCI bus for both a Realtek 8111E NIC and a > Samsung PM981a SSD. > +static int rockchip_pcie_set_vpcie(struct rockchip_pcie *rockchip) > +{ > + struct device *dev = rockchip->dev; > + int err; > + > + if (!IS_ERR(rockchip->vpcie12v)) { > + err = regulator_enable(rockchip->vpcie12v); > + if (err) { > + dev_err(dev, "fail to enable vpcie12v regulator\n"); > + goto err_out; > + } > + } > + > + if (!IS_ERR(rockchip->vpcie3v3)) { > + err = regulator_enable(rockchip->vpcie3v3); > + if (err) { > + dev_err(dev, "fail to enable vpcie3v3 regulator\n"); > + goto err_disable_12v; > + } > + } > + > + err = regulator_enable(rockchip->vpcie1v8); > + if (err) { > + dev_err(dev, "fail to enable vpcie1v8 regulator\n"); > + goto err_disable_3v3; > + } > + > + err = regulator_enable(rockchip->vpcie0v9); > + if (err) { > + dev_err(dev, "fail to enable vpcie0v9 regulator\n"); > + goto err_disable_1v8; > + } > + > + return 0; > + > +err_disable_1v8: > + regulator_disable(rockchip->vpcie1v8); > +err_disable_3v3: > + if (!IS_ERR(rockchip->vpcie3v3)) > + regulator_disable(rockchip->vpcie3v3); > +err_disable_12v: > + if (!IS_ERR(rockchip->vpcie12v)) > + regulator_disable(rockchip->vpcie12v); > +err_out: > + return err; > +} This *looks* like it could be strictly a move of rockchip_pcie_set_vpcie(), without changing it at all. If that's the case, please make the move a separate patch so it's more obvious what the interesting changes that actually make a difference are.