summaryrefslogtreecommitdiff
path: root/crypto/async_tx/async_memcpy.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2013-03-11 12:54:48 +1100
committerJames Morris <james.l.morris@oracle.com>2013-03-11 12:54:48 +1100
commitae3fa576302633290c8d7c394c4098ec027bd8a1 (patch)
tree51a6d97b1ef57be7cb16c797497a610b9e1e1a5d /crypto/async_tx/async_memcpy.c
parentca10c662b0ec80db86864277a94889cc63bae958 (diff)
parenta390f39a9ef577563398884870a50eba558dfe49 (diff)
downloadlinux-crypto-ae3fa576302633290c8d7c394c4098ec027bd8a1.tar.gz
linux-crypto-ae3fa576302633290c8d7c394c4098ec027bd8a1.zip
Merge tag 'v3.9-rc2' into next
Sync with Linus. Linux 3.9-rc2
Diffstat (limited to 'crypto/async_tx/async_memcpy.c')
-rw-r--r--crypto/async_tx/async_memcpy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c
index 361b5e82..9e62feff 100644
--- a/crypto/async_tx/async_memcpy.c
+++ b/crypto/async_tx/async_memcpy.c
@@ -67,6 +67,12 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
tx = device->device_prep_dma_memcpy(chan, dma_dest, dma_src,
len, dma_prep_flags);
+ if (!tx) {
+ dma_unmap_page(device->dev, dma_dest, len,
+ DMA_FROM_DEVICE);
+ dma_unmap_page(device->dev, dma_src, len,
+ DMA_TO_DEVICE);
+ }
}
if (tx) {