This is a note to let you know that I've just added the patch titled clk: qcom: dispcc-sm8450: fix runtime PM imbalance on probe errors to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: clk-qcom-dispcc-sm8450-fix-runtime-pm-imbalance-on-probe-errors.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b0f3d01bda6c3f6f811e70f76d2040ae81f64565 Mon Sep 17 00:00:00 2001 From: Johan Hovold <johan+linaro@xxxxxxxxxx> Date: Tue, 18 Jul 2023 15:28:56 +0200 Subject: clk: qcom: dispcc-sm8450: fix runtime PM imbalance on probe errors From: Johan Hovold <johan+linaro@xxxxxxxxxx> commit b0f3d01bda6c3f6f811e70f76d2040ae81f64565 upstream. Make sure to decrement the runtime PM usage count before returning in case regmap initialisation fails. Fixes: 16fb89f92ec4 ("clk: qcom: Add support for Display Clock Controller on SM8450") Cc: stable@xxxxxxxxxxxxxxx # 6.1 Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx> Link: https://lore.kernel.org/r/20230718132902.21430-3-johan+linaro@xxxxxxxxxx Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/clk/qcom/dispcc-sm8450.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) --- a/drivers/clk/qcom/dispcc-sm8450.c +++ b/drivers/clk/qcom/dispcc-sm8450.c @@ -1783,8 +1783,10 @@ static int disp_cc_sm8450_probe(struct p return ret; regmap = qcom_cc_map(pdev, &disp_cc_sm8450_desc); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); + if (IS_ERR(regmap)) { + ret = PTR_ERR(regmap); + goto err_put_rpm; + } clk_lucid_evo_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config); clk_lucid_evo_pll_configure(&disp_cc_pll1, regmap, &disp_cc_pll1_config); @@ -1799,9 +1801,16 @@ static int disp_cc_sm8450_probe(struct p regmap_update_bits(regmap, 0xe05c, BIT(0), BIT(0)); ret = qcom_cc_really_probe(pdev, &disp_cc_sm8450_desc, regmap); + if (ret) + goto err_put_rpm; pm_runtime_put(&pdev->dev); + return 0; + +err_put_rpm: + pm_runtime_put_sync(&pdev->dev); + return ret; } Patches currently in stable-queue which might be from johan+linaro@xxxxxxxxxx are queue-6.1/clk-qcom-camcc-sc7180-fix-async-resume-during-probe.patch queue-6.1/clk-qcom-lpasscc-sc7280-fix-missing-resume-during-probe.patch queue-6.1/clk-qcom-mss-sc7180-fix-missing-resume-during-probe.patch queue-6.1/clk-qcom-turingcc-qcs404-fix-missing-resume-during-probe.patch queue-6.1/clk-qcom-dispcc-sm8450-fix-runtime-pm-imbalance-on-probe-errors.patch queue-6.1/clk-qcom-q6sstop-qcs404-fix-missing-resume-during-probe.patch