Commit 84693d87 authored by Stephan Mueller's avatar Stephan Mueller Committed by Herbert Xu

crypto: drbg - remove unnecessary sanity check for shadow state

During creation of the DRBG shadow state, it is ensured that the DRBG
state structure is already allocated. Thus, a sanity check for verifying
that the structure is allocated is removed.
Signed-off-by: default avatarStephan Mueller <smueller@chronox.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 05c81ccd
...@@ -1155,9 +1155,6 @@ static inline int drbg_alloc_state(struct drbg_state *drbg) ...@@ -1155,9 +1155,6 @@ static inline int drbg_alloc_state(struct drbg_state *drbg)
int ret = -ENOMEM; int ret = -ENOMEM;
unsigned int sb_size = 0; unsigned int sb_size = 0;
if (!drbg)
return -EINVAL;
drbg->V = kmalloc(drbg_statelen(drbg), GFP_KERNEL); drbg->V = kmalloc(drbg_statelen(drbg), GFP_KERNEL);
if (!drbg->V) if (!drbg->V)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment