From: Peter Ujfalusi Date: Tue, 12 May 2020 13:45:19 +0000 (+0300) Subject: dmaengine: ti: k3-udma: Use proper return code in alloc_chan_resources X-Git-Tag: v5.10.7~2375^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ae6d7bd7397e46bd72cb85ab573a669c4dac925;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20200512134519.5642-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 653aea3..9769a46 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; } }