From: Jon Hunter <jonathanh@nvidia.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: <linux-tegra@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH V3] memory: tegra186-emc: Fix missing put_bpmp
Date: Thu, 6 Nov 2025 19:05:50 +0000 [thread overview]
Message-ID: <20251106190550.1776974-1-jonathanh@nvidia.com> (raw)
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 V2:
- Eliminated extra line for initialising 'err' variable.
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..b73daf5326cc 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 = dev_err_probe(&pdev->dev, PTR_ERR(emc->clk),
+ "failed to get EMC clock\n");
+ goto put_bpmp;
+ }
platform_set_drvdata(pdev, emc);
emc->dev = &pdev->dev;
--
2.43.0
next reply other threads:[~2025-11-06 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 19:05 Jon Hunter [this message]
2025-11-07 15:27 ` [PATCH V3] memory: tegra186-emc: Fix missing put_bpmp 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=20251106190550.1776974-1-jonathanh@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=krzk@kernel.org \
--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