diff options
author | Stephan Mueller <smueller@chronox.de> | 2014-08-17 11:41:38 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-25 08:34:14 -0400 |
commit | 84693d87a6d7e84a5183fc871653269880614d92 (patch) | |
tree | e8364a6ea136520e0ba1a80eb4138bcc85f4ce9f /crypto | |
parent | 05c81ccd9087d238c10b234eadb55632742e5518 (diff) |
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: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/drbg.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c index b4938bb4c465..9fd239fea963 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c | |||
@@ -1155,9 +1155,6 @@ static inline int drbg_alloc_state(struct drbg_state *drbg) | |||
1155 | int ret = -ENOMEM; | 1155 | int ret = -ENOMEM; |
1156 | unsigned int sb_size = 0; | 1156 | unsigned int sb_size = 0; |
1157 | 1157 | ||
1158 | if (!drbg) | ||
1159 | return -EINVAL; | ||
1160 | |||
1161 | drbg->V = kmalloc(drbg_statelen(drbg), GFP_KERNEL); | 1158 | drbg->V = kmalloc(drbg_statelen(drbg), GFP_KERNEL); |
1162 | if (!drbg->V) | 1159 | if (!drbg->V) |
1163 | goto err; | 1160 | goto err; |