summaryrefslogtreecommitdiff
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-09-08 12:26:05 +0530
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:07:24 +0200
commit2999966b3b85fc0cfd732b4fdf6f7cecbecb8da8 (patch)
treeb93f99614b831ccfe7b669a0f761724c9babdb25 /drivers/dma/ste_dma40.c
parent79a52de74a497765b02b669c71f94a1a3af9a99b (diff)
dma40: unconfigure on allocation failure
Set the channel configured state to false on an allocation failure so that if the channel is later attempted to be allocated as a memcpy channel (i.e. no filter function to reconfigure it), it is correctly configured as memcpy instead of incorrectly using a left-over slave configuration. Change-Id: I021b39a45867a09ba0282ac370637f7b2dcf6190 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index b0b2959ae52..baec161a056 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2136,6 +2136,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
if (err) {
dev_err(&d40c->chan.dev->device,
"[%s] Failed to allocate channel\n", __func__);
+ d40c->configured = false;
goto fail;
}