summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorChris Zhong <zyw@rock-chips.com>2016-09-08 20:38:11 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2017-12-15 13:30:40 +0300
commit3cb0ab6e008f2a9ffe2d1be4246984003caed7e2 (patch)
tree9df9c73e6d2d529140433ca5c1eee910ebe07d93 /drivers/phy
parente796cc6a3a9186c92092e2f5929cf8f65b56cf01 (diff)
downloadlinux-3cb0ab6e008f2a9ffe2d1be4246984003caed7e2.tar.xz
phy: rockchip-typec: add pm_runtime_disable in err case
Add pm_runtime_disable in err case to make the pm_runtime_enable/disable is invoked balanced. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/rockchip/phy-rockchip-typec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index ee85fa0ca4b0..7492c8978217 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1137,6 +1137,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(phy)) {
dev_err(dev, "failed to create phy: %s\n",
child_np->name);
+ pm_runtime_disable(dev);
return PTR_ERR(phy);
}
@@ -1146,6 +1147,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
if (IS_ERR(phy_provider)) {
dev_err(dev, "Failed to register phy provider\n");
+ pm_runtime_disable(dev);
return PTR_ERR(phy_provider);
}