[PATCH 06/12] DMAENGINE: free txd list if submission fails on PL08X

Linus Walleij linus.walleij at stericsson.com
Tue Aug 31 08:12:08 EDT 2010


Sometimes oversubscribed channels fail to mux in a signal line for
the transmission, and we bail out. Make sure we also clean out any
pending txd lists when this happens.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/dma/amba-pl08x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 65f595c..65892d5 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1270,6 +1270,7 @@ static dma_cookie_t pl08x_tx_submit(struct dma_async_tx_descriptor *tx)
 	ret = prep_phy_channel(plchan, txd);
 	if (ret) {
 		/* No physical channel available, cope with it */
+		pl08x_free_txd_list(pl08x, plchan);
 		spin_unlock_irqrestore(&plchan->lock, flags);
 		return -EBUSY;
 	}
-- 
1.6.3.3




More information about the linux-arm-kernel mailing list