dmaengine: ti: k3-udma: Fix cleanup code for alloc_chan_resources
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 27 May 2020 07:06:11 +0000 (10:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:49 +0000 (10:19 +0200)
commite3601dc0ac7f598df5e15643a82e88b769301510
treed6b886e27b36f1ab5ba6af0e857cf85300fd041c
parent92a0e90abfb58d101639d152b98061ce76a3713f
dmaengine: ti: k3-udma: Fix cleanup code for alloc_chan_resources

[ Upstream commit 5a9377cc7421b59b13c9b90b8dc0aca332a1c958 ]

Some of the earlier errors should be sent to the error cleanup path to
make sure that the uchan struct is reset, the dma_pool (if allocated) is
released and memcpy channel pairs are released in a correct way.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200527070612.636-2-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/ti/k3-udma.c