Thread (10 messages) 10 messages, 2 authors, 2014-08-25
STALE4352d

[PATCH 8/8] DRBG: remove unnecessary sanity check for shadow state

From: Stephan Mueller <hidden>
Date: 2014-08-17 15:42:39
Also in: lkml
Subsystem: crypto api, the rest · Maintainers: Herbert Xu, "David S. Miller", Linus Torvalds

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 <redacted>
---
 crypto/drbg.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/crypto/drbg.c b/crypto/drbg.c
index a556180..f009939 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -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;
-- 
1.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help