Skip to content
Commit ffe3ee8b authored by Ben Hutchings's avatar Ben Hutchings Committed by Herbert Xu
Browse files

crypto: omap - Avoid redundant copy when using truncated sg list



omap_crypto_cleanup() currently copies data from sg to orig if either
copy flag is set.  However OMAP_CRYPTO_SG_COPIED means that sg refers
to the same pages as orig, truncated to len bytes.  There is no need
to copy in this case.

Only copy data if the OMAP_CRYPTO_DATA_COPIED flag is set.

Fixes: 74ed87e7 ("crypto: omap - add base support library for common ...")
Signed-off-by: default avatarBen Hutchings <ben.hutchings@mind.be>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9491923e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment