[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d23a9447-4bef-476a-9f90-3ac2ba968dbd@kernel.org>
Date: Thu, 5 Sep 2024 14:13:20 +0200
From: Konrad Dybcio <konradybcio@...nel.org>
To: Vikram Sharma <quic_vikramsa@...cinc.com>, Robert Foss
<rfoss@...nel.org>, Todor Tomov <todor.too@...il.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Kapatrala Syed <akapatra@...cinc.com>,
Hariram Purushothaman <hariramp@...cinc.com>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
cros-qcom-dts-watchers@...omium.org,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-media@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, stable@...r.kernel.org
Subject: Re: [PATCH 03/10] media: qcom: camss: Fix potential crash if domain
attach fails
On 4.09.2024 1:10 PM, Vikram Sharma wrote:
> Fix a potential crash in camss by ensuring detach is skipped if attach
> is unsuccessful.
>
> Fixes: d89751c61279 ("media: qcom: camss: Add support for named power-domains")
> CC: stable@...r.kernel.org
> Signed-off-by: Vikram Sharma <quic_vikramsa@...cinc.com>
> ---
> drivers/media/platform/qcom/camss/camss.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index d64985ca6e88..447b89d07e8a 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -2132,7 +2132,7 @@ static int camss_configure_pd(struct camss *camss)
> camss->res->pd_name);
> if (IS_ERR(camss->genpd)) {
> ret = PTR_ERR(camss->genpd);
> - goto fail_pm;
> + goto fail_pm_attach;
> }
> }
>
> @@ -2149,7 +2149,7 @@ static int camss_configure_pd(struct camss *camss)
> ret = -ENODEV;
> else
> ret = PTR_ERR(camss->genpd);
> - goto fail_pm;
> + goto fail_pm_attach;
> }
> camss->genpd_link = device_link_add(camss->dev, camss->genpd,
> DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME |
> @@ -2164,6 +2164,7 @@ static int camss_configure_pd(struct camss *camss)
> fail_pm:
> dev_pm_domain_detach(camss->genpd, true);
>
> +fail_pm_attach:
> return ret;
What's the point, just call return directly where you added the goto
Konrad
Powered by blists - more mailing lists