memory: tegra186-emc: Fix missing put_bpmp
Subsystems (2)
Jon Hunter
maintainerPATCH v3 1/1 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.
---
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(-)
drivers/memory/tegra/tegra186-emc.c +5 -3
@@ -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;
Signature · 1 line
2.43.0
Krzysztof Kozlowski
AppliedQuoted 6 lines · Jon Hunter
Commit
a52ddb98a674("memory: tegra186-emc: Simplify and handle deferred probe withdev_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 'gotoput_bpmp' ifdevm_clk_get()fails.
Applied, thanks!
[1/1] memory: tegra186-emc: Fix missing put_bpmp
https://git.kernel.org/krzk/linux-mem-ctrl/c/8728bdd648f1b0f48ddfdb57bf6d9e7515e02518
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>