From: Fabio Estevam Date: Mon, 30 Nov 2015 13:03:58 +0000 (-0200) Subject: crypto: caam - pass the correct buffer length X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f456cd2dc8578f989ef12964c11aa7b2fafbc319;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Herbert Xu --- 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);