dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 May 2020 21:42:05 +0000 (23:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 14:43:07 +0000 (16:43 +0200)
commit6321cca1390c5b08c23d0a15c3c3544333c6d206
tree5efaee086f68e949f79769e98e0929dd9a2023af
parent50229ba3f55da301c0af4d341605e33e535a4c40
dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'

commit 3a5fd0dbd87853f8bd2ea275a5b3b41d6686e761 upstream.

Commit b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
has moved some code in the probe function and reordered the error handling
path accordingly.
However, a goto has been missed.

Fix it and goto the right label if 'dma_async_device_register()' fails, so
that all resources are released.

Fixes: b53611fb1ce9 ("dmaengine: tegra210-adma: Fix crash during probe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200516214205.276266-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/tegra210-adma.c