dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nabige Aala" <nabige.aala@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, neil.armstrong@linaro.org,
	devicetree@vger.kernel.org, vkoul@kernel.org, robh@kernel.org,
	conor+dt@kernel.org, olteanv@gmail.com,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 08/13] phy: qcom: edp: Generalize power-on path for per-SoC overrides
Date: Mon, 12 Oct 2026 13:46:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-168210@kernel.org> (raw)
In-Reply-To: <20261012-nord-drv-dt-v2-8-a2ab9af954d2@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] phy: qcom: edp: resource leak on error paths in qcom_edp_phy_init
--

commit 21c4ca6694dd5d440a6b00869831eb17626e0879
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>

phy: qcom: edp: Generalize power-on path for per-SoC overrides

This patch generalizes the power-on path by introducing a data-driven loop
for TX resistor writes and adding several SoC-specific registers to the
configuration structure. It also makes the com_clk_fwd_cfg callback optional.

> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index d5c6835b6c704..c5df1086607f0 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c

[ ... ]

> @@ -313,9 +328,11 @@ static int qcom_edp_phy_init(struct phy *phy)
>  
>  	memcpy(aux_cfg, edp->cfg->aux_cfg, sizeof(aux_cfg));
>  
> -	ret = edp->cfg->ver_ops->com_clk_fwd_cfg(edp);
> -	if (ret)
> -		return ret;
> +	if (edp->cfg->ver_ops->com_clk_fwd_cfg) {
> +		ret = edp->cfg->ver_ops->com_clk_fwd_cfg(edp);
> +		if (ret)
> +			return ret;

[Severity: High]
Does this error path leak the regulators and clocks?

Earlier in qcom_edp_phy_init(), regulators and clocks are successfully
enabled via regulator_bulk_enable() and clk_bulk_prepare_enable(). If the
newly wrapped optional com_clk_fwd_cfg() callback returns an error, the
function returns directly. This entirely bypasses the out_disable_supplies
cleanup label, resulting in a permanent leak of the regulator references.

Furthermore, there is no corresponding clk_bulk_disable_unprepare() call at
all, meaning the clocks will permanently leak as well.

> +	}
>  
>  	writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
>  	       DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261012-nord-drv-dt-v2-0-a2ab9af954d2@oss.qualcomm.com?part=8

  reply	other threads:[~2026-10-12 13:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 13:32 [PATCH v2 00/13] Add Qualcomm Nord display and eDP PHY support Nabige Aala
2026-10-12 13:32 ` [PATCH v2 01/13] dt-bindings: phy: qcom,edp-phy: Add DP PHY compatible for Nord Nabige Aala
2026-10-13  7:37   ` Krzysztof Kozlowski
2026-10-12 13:32 ` [PATCH v2 02/13] dt-bindings: display: msm: Document the Nord DiplayPort controller Nabige Aala
2026-10-13  7:44   ` Krzysztof Kozlowski
2026-10-13  8:48     ` Krzysztof Kozlowski
2026-10-12 13:32 ` [PATCH v2 03/13] dt-bindings: display/msm: Document Nord MDSS Nabige Aala
2026-10-12 13:45   ` sashiko-bot
2026-10-13  8:48   ` Krzysztof Kozlowski
2026-10-12 13:32 ` [PATCH v2 04/13] drm/msm/dpu: Add support for DPU 12.1 on Nord Nabige Aala
2026-10-13  9:28   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 05/13] drm/msm: mdss: Add support for MDSS " Nabige Aala
2026-10-12 13:32 ` [PATCH v2 06/13] drm/msm/dp: Add support for DP controllers " Nabige Aala
2026-10-12 13:47   ` sashiko-bot
2026-10-12 14:01   ` Konrad Dybcio
2026-10-13  9:18   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 07/13] phy: qcom: edp: Add Nord-specific register offsets Nabige Aala
2026-10-13  8:43   ` Abel Vesa
2026-10-13 10:19   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 08/13] phy: qcom: edp: Generalize power-on path for per-SoC overrides Nabige Aala
2026-10-12 13:46   ` sashiko-bot [this message]
2026-10-13 10:26   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 09/13] phy: qcom: edp: Add Nord voltage-swing and pre-emphasis tables Nabige Aala
2026-10-13  8:44   ` Abel Vesa
2026-10-13 10:27   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 10/13] phy: qcom: edp: Add Nord spread-spectrum clocking configuration callback Nabige Aala
2026-10-13  8:47   ` Abel Vesa
2026-10-13 10:28   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 11/13] phy: qcom: edp: Add Nord PLL " Nabige Aala
2026-10-12 13:32 ` [PATCH v2 12/13] phy: qcom: edp: Add Nord PHY configuration data tables Nabige Aala
2026-10-12 13:43   ` sashiko-bot
2026-10-13 10:33   ` Dmitry Baryshkov
2026-10-12 13:32 ` [PATCH v2 13/13] phy: qcom: edp: Add Nord phy_cfg, ops and OF compatible Nabige Aala
2026-10-12 13:44   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-168210@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=nabige.aala@oss.qualcomm.com \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox