summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-11-30 14:03:58 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2015-12-04 15:29:56 +0100
commitf456cd2dc8578f989ef12964c11aa7b2fafbc319 (patch)
treed2e7fe744185f7035b4cab5cf53ef03fc79b8102 /drivers
parentcrypto: cryptd - Assign statesize properly (diff)
downloadlinux-f456cd2dc8578f989ef12964c11aa7b2fafbc319.tar.xz
linux-f456cd2dc8578f989ef12964c11aa7b2fafbc319.zip
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')
-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);