]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: caam - Handle errors in dma_map_sg_chained
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 16 Jun 2015 05:54:22 +0000 (13:54 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 17 Jun 2015 07:35:08 +0000 (15:35 +0800)
commit6c94711cbdf595766bc3295e437c3579943cd846
treeb718b155bf880275c71ee5a2d4525f7468f3a566
parent201f28f055917300c3301b19d0e0e674b9cf8cb7
crypto: caam - Handle errors in dma_map_sg_chained

Currently dma_map_sg_chained does not handle errors from the
underlying dma_map_sg calls.  This patch adds rollback in case
of an error by simply calling dma_unmap_sg_chained for the ones
that we've already mapped.

All current callers ignore the return value so this should have
no impact on them.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/sg_sw_sec4.h