diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2022-04-27 08:32:41 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-05-03 06:41:01 +0200 |
commit | f0a4bc38a12f5a0cc5ad68670d9480e91e6a94df (patch) | |
tree | 0f91b593e075be1d44280ca6910c5da9ed44bf2e /drivers/phy | |
parent | dt-bindings: phy: renesas,usb2-phy: Document RZ/G2UL phy bindings (diff) | |
download | linux-f0a4bc38a12f5a0cc5ad68670d9480e91e6a94df.tar.xz linux-f0a4bc38a12f5a0cc5ad68670d9480e91e6a94df.zip |
phy: qcom-qmp: fix struct clk leak on probe errors
Make sure to release the pipe clock reference in case of a late probe
error (e.g. probe deferral).
Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Cc: stable@vger.kernel.org # 4.12
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220427063243.32576-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/qualcomm/phy-qcom-qmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 641f95b3934c..f8b4064221fc 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -5963,7 +5963,7 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id, * all phys that don't need this. */ snprintf(prop_name, sizeof(prop_name), "pipe%d", id); - qphy->pipe_clk = of_clk_get_by_name(np, prop_name); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); if (IS_ERR(qphy->pipe_clk)) { if (cfg->type == PHY_TYPE_PCIE || cfg->type == PHY_TYPE_USB3) { |