summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-11-30 11:03:58 -0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-12-04 22:29:56 +0800
commitf456cd2dc8578f989ef12964c11aa7b2fafbc319 (patch)
treed2e7fe744185f7035b4cab5cf53ef03fc79b8102 /drivers/crypto/caam
parent1a07834024dfca5c4bed5de8f8714306e0a11836 (diff)
crypto: caam - pass the correct buffer length
When buffer 0 is used we should use buflen_0 instead of buflen_1. Fix it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam')
-rw-r--r--drivers/crypto/caam/caamhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index fe9c156333ca..5845d4a08797 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -1596,7 +1596,7 @@ static int ahash_export(struct ahash_request *req, void *out)
len = state->buflen_1;
} else {
buf = state->buf_0;
- len = state->buflen_1;
+ len = state->buflen_0;
}
memcpy(export->buf, buf, len);