diff options
| author | Jon Hunter <jonathanh@nvidia.com> | 2025-11-06 19:05:50 +0000 |
|---|---|---|
| committer | Krzysztof Kozlowski <krzk@kernel.org> | 2025-11-22 13:41:24 +0100 |
| commit | 1463299a227d02b40c842a5d91d989cb26da5bbb (patch) | |
| tree | 428845d382c148340a1126530ba9044b82e66c93 | |
| parent | 42ec0bc61f052beb0d9a6a889fe746591de74508 (diff) | |
memory: tegra186-emc: Fix missing put_bpmp
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>
Link: https://patch.msgid.link/20251106190550.1776974-1-jonathanh@nvidia.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
| -rw-r--r-- | drivers/memory/tegra/tegra186-emc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 9959ad5804b4..dfddceecdd1a 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -322,9 +322,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; |
