memory: tegra186-emc: Fix missing put_bpmp
Subsystems (2)
Jon Hunter
maintainerPATCH 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.
--- 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 =PTR_ERR (emc->clk); +dev_err_probe (&pdev->dev, err,"failed to get EMC clock: %d\n" ); + goto put_bpmp; + }platform_set_drvdata (pdev, emc); emc->dev = &pdev->dev;
Signature · 1 line
2.43.0
Jon Hunter
maintainerQuoted 16 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.Fixes a52ddb98a674 ("memory: tegra186-emc: Simplify and handle deferred probe with dev_err_probe()")Signed-off-by Jon Hunter <[email protected]>--- drivers/memory/tegra/tegra186-emc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/memory/tegra/tegra186-emc.c +0
-0
drivers/memory/tegra/tegra186-emc.c static int tegra186_emc_probe(struct platform_device *pdev) · line 453
Quoted 9 lines
drivers/memory/tegra/tegra186-emc.c +3
-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 =PTR_ERR (emc->clk); +dev_err_probe (&pdev->dev, err,"failed to get EMC clock: %d\n" );
Ugh this is wrong. Will send a V2 shortly ...
Jon
Signature · 1 line
nvpublic