]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: nx - Remove unnecessary maxauthsize check
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 21 May 2015 07:11:07 +0000 (15:11 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2015 03:25:54 +0000 (11:25 +0800)
The crypto layer already checks maxauthsize when setauthsize is
called.  So there is no need to check it again within setauthsize.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-aes-gcm.c

index 88c562434bc0b737b2a6d99856e6dda284424634..e4e64f688158532f5153711359597e0d7bae078b 100644 (file)
@@ -96,9 +96,6 @@ out:
 static int gcm_aes_nx_setauthsize(struct crypto_aead *tfm,
                                  unsigned int authsize)
 {
-       if (authsize > crypto_aead_alg(tfm)->maxauthsize)
-               return -EINVAL;
-
        crypto_aead_crt(tfm)->authsize = authsize;
 
        return 0;