memory: tegra: Fix an error handling path in tegra186_emc_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 6 May 2020 20:09:07 +0000 (22:09 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 22 Jun 2020 11:54:58 +0000 (13:54 +0200)
commitc3d4eb3bf6ad32466555b31094f33a299444f795
treef6c92109c2179e3f35f9fbdd95d30168e424ed5d
parent930c68180ffb059647d75ee28918bcb87f18d788
memory: tegra: Fix an error handling path in tegra186_emc_probe()

The call to tegra_bpmp_get() must be balanced by a call to
tegra_bpmp_put() in case of error, as already done in the remove
function.

Add an error handling path and corresponding goto.

Fixes: 52d15dd23f0b ("memory: tegra: Support DVFS on Tegra186 and later")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/memory/tegra/tegra186-emc.c