Skip to content

Commit

Permalink
crypto: inside-secure - remove useless memset
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
atenart authored and herbertx committed Dec 22, 2017
1 parent dfbcc08 commit 60310ea
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/crypto/inside-secure/safexcel_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 60310ea

Please sign in to comment.