summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2021-07-22 01:39:54 +0300
committerMichael Bestas <mkbestas@lineageos.org>2021-07-22 01:39:54 +0300
commit954d3318ebc1b79dc469995450b23c30ce44b6af (patch)
tree50ba2449476562b2aa8e2f6bd55e5f4915958163 /drivers/phy
parent3c741a8b469c522434e6841d8618702303fd6a21 (diff)
parente5239ed489f6471bc235af8534ee57d1923778e4 (diff)
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-18.1-caf-msm8998
This brings LA.UM.9.2.r1-03400-SDMxx0.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: e5239ed489f64 Merge 4.4.276 into android-4.4-p Change-Id: I5f3fdc31e61b229b299cf72014710d36e42863d8
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-dm816x-usb.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/phy/phy-dm816x-usb.c b/drivers/phy/phy-dm816x-usb.c
index b4bbef664d20..908b5ff0e888 100644
--- a/drivers/phy/phy-dm816x-usb.c
+++ b/drivers/phy/phy-dm816x-usb.c
@@ -246,19 +246,28 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)
pm_runtime_enable(phy->dev);
generic_phy = devm_phy_create(phy->dev, NULL, &ops);
- if (IS_ERR(generic_phy))
- return PTR_ERR(generic_phy);
+ if (IS_ERR(generic_phy)) {
+ error = PTR_ERR(generic_phy);
+ goto clk_unprepare;
+ }
phy_set_drvdata(generic_phy, phy);
phy_provider = devm_of_phy_provider_register(phy->dev,
of_phy_simple_xlate);
- if (IS_ERR(phy_provider))
- return PTR_ERR(phy_provider);
+ if (IS_ERR(phy_provider)) {
+ error = PTR_ERR(phy_provider);
+ goto clk_unprepare;
+ }
usb_add_phy_dev(&phy->phy);
return 0;
+
+clk_unprepare:
+ pm_runtime_disable(phy->dev);
+ clk_unprepare(phy->refclk);
+ return error;
}
static int dm816x_usb_phy_remove(struct platform_device *pdev)