Call phy_exit() before returning on this error path. Fixes: 853c711e2caf ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> --- drivers/pci/controller/pcie-rockchip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c index fea867c24f75..35bfdf3e17a3 100644 --- a/drivers/pci/controller/pcie-rockchip.c +++ b/drivers/pci/controller/pcie-rockchip.c @@ -132,8 +132,10 @@ int rockchip_pcie_init_port(struct rockchip_pcie *rockchip) err = reset_control_bulk_assert(ROCKCHIP_NUM_CORE_RSTS, rockchip->core_rsts); - if (err) - return dev_err_probe(dev, err, "Couldn't assert Core resets\n"); + if (err) { + dev_err_probe(dev, err, "Couldn't assert Core resets\n"); + goto err_exit_phy; + } udelay(10); -- 2.45.2