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>
"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;