Thread (4 messages) 4 messages, 3 authors, 2015-05-18
STALE4085d

[PATCH] crypto: remove 842-nx null checks

From: Dan Streetman <hidden>
Date: 2015-05-15 15:08:04
Subsystem: crypto api, ibm power 842 compression accelerator, linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Herbert Xu, "David S. Miller", Haren Myneni, Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

Remove the null checks for tfm, src, slen, dst, dlen; tfm will never
be null and the other fields are always expected to be set correctly.

Reported-by: Dan Carpenter <redacted>
Signed-off-by: Dan Streetman <redacted>
---
 drivers/crypto/nx/nx-842-crypto.c | 6 ------
 1 file changed, 6 deletions(-)
diff --git a/drivers/crypto/nx/nx-842-crypto.c b/drivers/crypto/nx/nx-842-crypto.c
index cb177c3..2ffa103 100644
--- a/drivers/crypto/nx/nx-842-crypto.c
+++ b/drivers/crypto/nx/nx-842-crypto.c
@@ -298,9 +298,6 @@ static int nx842_crypto_compress(struct crypto_tfm *tfm,
 	bool add_header;
 	u16 ignore = 0;
 
-	if (!tfm || !src || !slen || !dst || !dlen)
-		return -EINVAL;
-
 	p.in = (u8 *)src;
 	p.iremain = slen;
 	p.out = dst;
@@ -483,9 +480,6 @@ static int nx842_crypto_decompress(struct crypto_tfm *tfm,
 	u16 ignore = 0;
 	bool usehw = true;
 
-	if (!tfm || !src || !slen || !dst || !dlen)
-		return -EINVAL;
-
 	p.in = (u8 *)src;
 	p.iremain = slen;
 	p.out = dst;
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help