diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-09-08 12:26:05 +0530 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-10-05 12:55:55 +0200 |
commit | 6a0873c713b7c9fb5dacdf6349c631f21b2c0c1f (patch) | |
tree | ed6aa316919bc7775e380dd2ac8e9a39f8e6ebd3 /drivers/dma | |
parent | 650f502ebf9f53cab70a4b519d5cc832e796d667 (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')
-rw-r--r-- | drivers/dma/ste_dma40.c | 1 |
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; } |