Commit f072f0e0 authored by Stephan Mueller's avatar Stephan Mueller Committed by Herbert Xu

crypto: drbg - remove superflowous memset(0)

Remove memset(0) which is not needed due to the kzalloc of the memory.
Signed-off-by: default avatarStephan Mueller <>
Signed-off-by: default avatarHerbert Xu <>
parent 45943a58
......@@ -728,11 +728,9 @@ static int drbg_hmac_update(struct drbg_state *drbg, struct list_head *seed,
if (!reseed) {
/* step 2 */
memset(drbg->C, 0, drbg_statelen(drbg));
if (!reseed)
/* step 2 -- memset(0) of C is implicit with kzalloc */
memset(drbg->V, 1, drbg_statelen(drbg));
drbg_string_fill(&seed1, drbg->V, drbg_statelen(drbg));
list_add_tail(&seed1.list, &seedlist);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment