summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2020-05-12 16:45:19 +0300
committerVinod Koul <vkoul@kernel.org>2020-05-15 11:22:41 +0530
commit7ae6d7bd7397e46bd72cb85ab573a669c4dac925 (patch)
treef545f2f27b51301ad94e132f01a317e26e14de3b /drivers/dma
parent6fea8735fd96f39c1a0ba52961069ae66e549595 (diff)
dmaengine: ti: k3-udma: Use proper return code in alloc_chan_resources
In udma_alloc_chan_resources() if the channel is not willing to stop then the function should return with error code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200512134519.5642-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ti/k3-udma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 653aea3f6de2..9769a4699cac 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -1850,6 +1850,7 @@ static int udma_alloc_chan_resources(struct dma_chan *chan)
udma_stop(uc);
if (udma_is_chan_running(uc)) {
dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
+ ret = -EBUSY;
goto err_res_free;
}
}