Skip to content

Commit

Permalink
crypto: drbg - remove unnecessary sanity check for shadow state
Browse files Browse the repository at this point in the history
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: Stephan Mueller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
smuellerDD authored and herbertx committed Aug 25, 2014
1 parent 05c81cc commit 84693d8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,6 @@ static inline int drbg_alloc_state(struct drbg_state *drbg)
int ret = -ENOMEM;
unsigned int sb_size = 0;

if (!drbg)
return -EINVAL;

drbg->V = kmalloc(drbg_statelen(drbg), GFP_KERNEL);
if (!drbg->V)
goto err;
Expand Down

0 comments on commit 84693d8

Please sign in to comment.