From: Dan Streetman Date: Fri, 15 May 2015 15:07:33 +0000 (-0400) Subject: crypto: nx - remove 842-nx null checks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9358eac06b8fcf9fcaf566ec825fc05e2b1acd10;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: nx - remove 842-nx null checks 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 Signed-off-by: Dan Streetman Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/nx/nx-842-crypto.c b/drivers/crypto/nx/nx-842-crypto.c index cb177c317179..2ffa1031c91f 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;