summaryrefslogtreecommitdiffstats
path: root/drivers/pci/host
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2017-08-23 15:03:17 +0800
committerBjorn Helgaas <bhelgaas@google.com>2017-08-29 13:18:08 -0500
commitefee827d3ddb8bd219392cbedc5e5afc6ccfd617 (patch)
tree0d5d5df37b93bf0fad35a32df894c22f40a40fbd /drivers/pci/host
parent8c595dd1fd97d8e241c7a8c2f9fe9b08867b1d4a (diff)
downloadlinux-efee827d3ddb8bd219392cbedc5e5afc6ccfd617.tar.bz2
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>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r--drivers/pci/host/pcie-rockchip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 7d7c69ac1261..ac8b8e8270f7 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -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;
}