PCI: rockchip: Disable vpcie0v9 if resume_noirq fails

Disable vpcie0v9 regulator if resume_noirq fails.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Jeffy Chen 2017-08-23 15:03:17 +08:00 committed by Bjorn Helgaas
parent 8c595dd1fd
commit efee827d3d
1 changed files with 4 additions and 1 deletions

View File

@ -1488,7 +1488,7 @@ static int __maybe_unused rockchip_pcie_resume_noirq(struct device *dev)
err = rockchip_pcie_enable_clocks(rockchip);
if (err)
return err;
goto err_disable_0v9;
err = rockchip_pcie_init_port(rockchip);
if (err)
@ -1508,6 +1508,9 @@ err_err_deinit_port:
rockchip_pcie_deinit_phys(rockchip);
err_pcie_resume:
rockchip_pcie_disable_clocks(rockchip);
err_disable_0v9:
if (!IS_ERR(rockchip->vpcie0v9))
regulator_disable(rockchip->vpcie0v9);
return err;
}