crypto: nx - remove 842-nx null checks
authorDan Streetman <ddstreet@ieee.org>
Fri, 15 May 2015 15:07:33 +0000 (11:07 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 18 May 2015 04:20:17 +0000 (12:20 +0800)
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 <dan.carpenter@oracle.com>
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-842-crypto.c

index cb177c317179e43aab8fa76d84595997388200eb..2ffa1031c91f67483366f2a226397b2a43ffac1d 100644 (file)
@@ -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;