Message ID | 20200512134519.5642-1-peter.ujfalusi@ti.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | dmaengine: ti: k3-udma: Use proper return code in alloc_chan_resources | expand |
On 12-05-20, 16:45, Peter Ujfalusi wrote: > In udma_alloc_chan_resources() if the channel is not willing to stop then > the function should return with error code. Applied, thanks
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 0a041747fb21..89d025a5c599 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -1870,6 +1870,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; } }
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> --- drivers/dma/ti/k3-udma.c | 1 + 1 file changed, 1 insertion(+)