memory: tegra186-emc: Fix missing put_bpmp
Commita52ddb98a6("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:a52ddb98a6("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>
This commit is contained in:
committed by
Krzysztof Kozlowski
parent
42ec0bc61f
commit
1463299a22
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user