Skip to contentSkip to conversation

dmaengine: ti: k3-udma: Use proper return code in alloc_chan_resources

PATCH Applied Peter Ujfalusi 2 participants 2 messages May 12, 2020 – May 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/dma/ti/k3-udma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma/ti/k3-udma.c +1 -0
index 0a041747fb21..89d025a5c599 100644
@@ -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;
 		}
 	}
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
maintainer Applied
#1 lore raw
Quoted 2 lines · Peter Ujfalusi

In udma_alloc_chan_resources() if the channel is not willing to stop then the function should return with error code.

Applied, thanks

Signature · 1 line
~Vinod