From: Lukasz Luba <lukasz.luba@arm.com>
To: Jiawen Liu <1298662399@qq.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Alim Akhtar <alim.akhtar@samsung.com>, stable@vger.kernel.org
Subject: Re: [PATCH v2] memory: exynos5422-dmc: handle clock enable failures
Date: Mon, 7 Sep 2026 09:43:35 +0100 [thread overview]
Message-ID: <b7b1b199-08a6-4685-9def-d4d6eb396cdc@arm.com> (raw)
In-Reply-To: <tencent_B0189529F550458590E3BA614EAB800FBF08@qq.com>
On 9/4/26 11:01, Jiawen Liu wrote:
> Check the return values of clk_prepare_enable() for fout_bpll and
> mout_bpll.
>
> If enabling fout_bpll fails, propagate the error. If enabling mout_bpll
> fails, disable fout_bpll before returning. This keeps the clock enable
> count balanced on probe error paths.
>
> Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jiawen Liu <1298662399@qq.com>
> ---
> Changes in v2:
> - Use the full author name in From and Signed-off-by.
> - Add Fixes and Cc stable tags.
> - Generate the submission with git format-patch.
>
> drivers/memory/samsung/exynos5422-dmc.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
> index 788d49c688b1..98c319552583 100644
> --- a/drivers/memory/samsung/exynos5422-dmc.c
> +++ b/drivers/memory/samsung/exynos5422-dmc.c
> @@ -1297,8 +1297,15 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)
> if (ret)
> return ret;
>
> - clk_prepare_enable(dmc->fout_bpll);
> - clk_prepare_enable(dmc->mout_bpll);
> + ret = clk_prepare_enable(dmc->fout_bpll);
> + if (ret)
> + return ret;
> +
> + ret = clk_prepare_enable(dmc->mout_bpll);
> + if (ret) {
> + clk_disable_unprepare(dmc->fout_bpll);
> + return ret;
> + }
>
> /*
> * Some bootloaders do not set clock routes correctly.
This one looks good.
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2026-09-07 8:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 10:01 Jiawen Liu
2026-09-07 8:43 ` Lukasz Luba [this message]
2026-09-11 6:55 ` Krzysztof Kozlowski
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=b7b1b199-08a6-4685-9def-d4d6eb396cdc@arm.com \
--to=lukasz.luba@arm.com \
--cc=1298662399@qq.com \
--cc=alim.akhtar@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=stable@vger.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
all inboxes | Powered by JetHome®