[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE-0n53qdRk0LRFambwRB=xiV4ak3Odoqhs4rOJg3x77c4MrTQ@mail.gmail.com>
Date: Thu, 28 Mar 2024 19:24:06 -0500
From: Stephen Boyd <swboyd@...omium.org>
To: Kuogee Hsieh <quic_khsieh@...cinc.com>, abel.vesa@...aro.org, agross@...nel.org,
airlied@...il.com, andersson@...nel.org, daniel@...ll.ch,
dianders@...omium.org, dmitry.baryshkov@...aro.org,
dri-devel@...ts.freedesktop.org, robdclark@...il.com, sean@...rly.run,
vkoul@...nel.org
Cc: quic_abhinavk@...cinc.com, quic_jesszhan@...cinc.com,
quic_sbillaka@...cinc.com, marijn.suijten@...ainline.org,
freedreno@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] phy/qcom-qmp-combo: propagate correct return value at phy_power_on()
Quoting Kuogee Hsieh (2024-03-28 14:07:15)
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 36632fa..884973a 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -2754,6 +2754,7 @@ static int qmp_combo_dp_power_on(struct phy *phy)
> const struct qmp_phy_cfg *cfg = qmp->cfg;
> void __iomem *tx = qmp->dp_tx;
> void __iomem *tx2 = qmp->dp_tx2;
> + int ret = 0;
Please don't initialize locals that are unused before being assigned
unconditionally.
>
> mutex_lock(&qmp->phy_mutex);
>
> @@ -2766,11 +2767,11 @@ static int qmp_combo_dp_power_on(struct phy *phy)
> cfg->configure_dp_tx(qmp);
>
> /* Configure link rate, swing, etc. */
> - cfg->configure_dp_phy(qmp);
> + ret = cfg->configure_dp_phy(qmp);
>
> mutex_unlock(&qmp->phy_mutex);
>
> - return 0;
> + return ret;
> }
Powered by blists - more mailing lists