OSDN Git Service

crypto: inside-secure - remove useless memset
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Thu, 14 Dec 2017 14:26:45 +0000 (15:26 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Dec 2017 09:03:29 +0000 (20:03 +1100)
This patch removes an useless memset in the ahash_export function, as
the zeroed buffer will be entirely overridden the next line.

Suggested-by: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_hash.c

index d4afc07..ac922b9 100644 (file)
@@ -624,7 +624,6 @@ static int safexcel_ahash_export(struct ahash_request *areq, void *out)
        export->processed = req->processed;
 
        memcpy(export->state, req->state, req->state_sz);
-       memset(export->cache, 0, crypto_ahash_blocksize(ahash));
        memcpy(export->cache, req->cache, crypto_ahash_blocksize(ahash));
 
        return 0;