From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jon Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org
Subject: Re: [PATCH V2] memory: tegra186-emc: Fix missing put_bpmp
Date: Thu, 6 Nov 2025 19:35:00 +0100 [thread overview]
Message-ID: <aa8c480a-05c1-4dd0-8597-afa423539cce@kernel.org> (raw)
In-Reply-To: <20251106173240.1724099-1-jonathanh@nvidia.com>
On 06/11/2025 18:32, Jon Hunter wrote:
> Commit a52ddb98a674 ("memory: tegra186-emc: Simplify and handle deferred
> probe with dev_err_probe()") accidently dropped a call to 'put_bpmp' to
> release a handle to the BPMP when getting the EMC clock fails. Fix this
> by restoring the 'goto put_bpmp' if devm_clk_get() fails.
>
> Fixes: a52ddb98a674 ("memory: tegra186-emc: Simplify and handle deferred probe with dev_err_probe()")
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> Changes since V1:
> - Fixed dev_err_probe message format
>
> Please note that the commit hash reference is based upon the hash in
> the -next tree.
>
> drivers/memory/tegra/tegra186-emc.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
> index 74be09968baa..43595fd9c256 100644
> --- a/drivers/memory/tegra/tegra186-emc.c
> +++ b/drivers/memory/tegra/tegra186-emc.c
> @@ -448,9 +448,11 @@ static int tegra186_emc_probe(struct platform_device *pdev)
> "failed to get BPMP\n");
>
> emc->clk = devm_clk_get(&pdev->dev, "emc");
> - if (IS_ERR(emc->clk))
> - return dev_err_probe(&pdev->dev, PTR_ERR(emc->clk),
> - "failed to get EMC clock\n");
> + if (IS_ERR(emc->clk)) {
> + err = PTR_ERR(emc->clk);
> + dev_err_probe(&pdev->dev, err, "failed to get EMC clock\n");
This still should use standard dev_err_probe syntax, so:
err = dev_err_probe(..., PTR_ERR(), "....");
which saves you one line with earlier assignment.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-11-06 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 17:32 [PATCH V2] memory: tegra186-emc: Fix missing put_bpmp Jon Hunter
2025-11-06 18:35 ` Krzysztof Kozlowski [this message]
2025-11-06 19:03 ` Jon Hunter
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=aa8c480a-05c1-4dd0-8597-afa423539cce@kernel.org \
--to=krzk@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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