Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-20 12:08:06 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-20 12:08:07 +0100
commit134bd8fdfb57a08b3389a73de6697542c322073a (patch)
tree8355bb2fa3eeee79e4552316e0a2d0e458af93a2
parentf2a7fe0ec10967c78563d975dc1f0a91a5077706 (diff)
phy: qcom-qmp: Fix failure path in phy_init functions
(bsc#1051510).
-rw-r--r--patches.drivers/phy-qcom-qmp-Fix-failure-path-in-phy_init-functions.patch88
-rw-r--r--series.conf1
2 files changed, 89 insertions, 0 deletions
diff --git a/patches.drivers/phy-qcom-qmp-Fix-failure-path-in-phy_init-functions.patch b/patches.drivers/phy-qcom-qmp-Fix-failure-path-in-phy_init-functions.patch
new file mode 100644
index 0000000000..7760bcc7ee
--- /dev/null
+++ b/patches.drivers/phy-qcom-qmp-Fix-failure-path-in-phy_init-functions.patch
@@ -0,0 +1,88 @@
+From 8387c576b713bf677d59b7f16be64adb6b2de660 Mon Sep 17 00:00:00 2001
+From: Vivek Gautam <vivek.gautam@codeaurora.org>
+Date: Tue, 20 Jun 2017 11:27:18 +0530
+Subject: [PATCH] phy: qcom-qmp: Fix failure path in phy_init functions
+Git-commit: 8387c576b713bf677d59b7f16be64adb6b2de660
+Patch-mainline: v4.14-rc1
+References: bsc#1051510
+
+Fixing the clk enable failure path in qcom_qmp_phy_init()
+and cleanup the reset control deassertion failure path in
+qcom_qmp_phy_com_init().
+
+Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
+
+Cc: Kishon Vijay Abraham I <kishon@ti.com>
+Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/phy/qualcomm/phy-qcom-qmp.c | 15 ++++++---------
+ 1 file changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
+index 0c6cb8819200..e17f0351ccc2 100644
+--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
++++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
+@@ -775,8 +775,6 @@ static int qcom_qmp_phy_com_init(struct qcom_qmp *qmp)
+ if (ret) {
+ dev_err(qmp->dev, "%s reset deassert failed\n",
+ qmp->cfg->reset_list[i]);
+- while (--i >= 0)
+- reset_control_assert(qmp->resets[i]);
+ goto err_rst;
+ }
+ }
+@@ -805,7 +803,7 @@ static int qcom_qmp_phy_com_init(struct qcom_qmp *qmp)
+ if (ret) {
+ dev_err(qmp->dev,
+ "phy common block init timed-out\n");
+- goto err_com_init;
++ goto err_rst;
+ }
+ }
+
+@@ -813,11 +811,11 @@ static int qcom_qmp_phy_com_init(struct qcom_qmp *qmp)
+
+ return 0;
+
+-err_com_init:
++err_rst:
+ while (--i >= 0)
+ reset_control_assert(qmp->resets[i]);
+-err_rst:
+ mutex_unlock(&qmp->phy_mutex);
++
+ return ret;
+ }
+
+@@ -870,14 +868,13 @@ static int qcom_qmp_phy_init(struct phy *phy)
+ if (ret) {
+ dev_err(qmp->dev, "failed to enable %s clk, err=%d\n",
+ qmp->cfg->clk_list[i], ret);
+- while (--i >= 0)
+- clk_disable_unprepare(qmp->clks[i]);
++ goto err_clk;
+ }
+ }
+
+ ret = qcom_qmp_phy_com_init(qmp);
+ if (ret)
+- goto err_com_init;
++ goto err_clk;
+
+ if (cfg->has_lane_rst) {
+ ret = reset_control_deassert(qphy->lane_rst);
+@@ -925,7 +922,7 @@ static int qcom_qmp_phy_init(struct phy *phy)
+ reset_control_assert(qphy->lane_rst);
+ err_lane_rst:
+ qcom_qmp_phy_com_exit(qmp);
+-err_com_init:
++err_clk:
+ while (--i >= 0)
+ clk_disable_unprepare(qmp->clks[i]);
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index f740eabfb2..ebe04e010c 100644
--- a/series.conf
+++ b/series.conf
@@ -5391,6 +5391,7 @@
patches.drivers/0001-xhci-add-port-status-tracing.patch
patches.drivers/0021-usb-Increase-root-hub-reset-signaling-time-to-preven.patch
patches.drivers/0022-xhci-rework-bus_resume-and-check-ports-are-suspended.patch
+ patches.drivers/phy-qcom-qmp-Fix-failure-path-in-phy_init-functions.patch
patches.drivers/dt-bindings-phy-sun4i-usb-phy-add-property-descriptions-for-h3.patch
patches.drivers/0037-phy-rockchip-inno-usb2-add-support-for-rockchip-usbg.patch
patches.drivers/0038-phy-rockchip-inno-usb2-add-support-for-otg-mux-inter.patch