From b98860c4d2076a1332ae4268e235bf748d7e3f00 Mon Sep 17 00:00:00 2001 From: Chris Zhong Date: Thu, 8 Sep 2016 10:38:11 -0700 Subject: [PATCH] FROMLIST: 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. BUG=chrome-os-partner:52872 TEST=Check DP display and USB3 Change-Id: Ifc66a3e80d7b580963e609d2f14cea239104724c Signed-off-by: Chris Zhong (am from https://patchwork.kernel.org/patch/9321849/) Reviewed-on: https://chromium-review.googlesource.com/382723 Reviewed-by: Brian Norris Signed-off-by: William Wu --- drivers/phy/phy-rockchip-typec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c index 3f747ff094e8..26274654cf26 100644 --- a/drivers/phy/phy-rockchip-typec.c +++ b/drivers/phy/phy-rockchip-typec.c @@ -1015,6 +1015,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); } @@ -1024,6 +1025,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); } -- 2.34.1