dmaengine: imx-sdma: set sdmac->status to DMA_ERROR in err_out of sdma_prep_slave_sg()
authorShawn Guo <shawn.guo@freescale.com>
Wed, 19 Jan 2011 21:50:36 +0000 (05:50 +0800)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 31 Jan 2011 11:41:50 +0000 (12:41 +0100)
sdma_prep_dma_cyclic() sets sdmac->status to DMA_ERROR in err_out,
and sdma_prep_slave_sg() needs to do the same.  Otherwise,
sdmac->status stays at DMA_IN_PROGRESS, which will make the function
return immediately next time it gets called.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
drivers/dma/imx-sdma.c

index cf8cc0b8e7f70ad433e35b30ac05da49d1ca0ef8..6fc04d85be6bbb1c8515737387ca95a788122c0f 100644 (file)
@@ -947,6 +947,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
 
        return &sdmac->desc;
 err_out:
+       sdmac->status = DMA_ERROR;
        return NULL;
 }