From: Herbert Xu Date: Thu, 21 May 2015 07:11:07 +0000 (+0800) Subject: crypto: nx - Remove unnecessary maxauthsize check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56fcf73a29007aa7bec2e3fc5da2962f3f72d610;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git crypto: nx - Remove unnecessary maxauthsize check 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 --- diff --git a/drivers/crypto/nx/nx-aes-gcm.c b/drivers/crypto/nx/nx-aes-gcm.c index 88c562434bc0..e4e64f688158 100644 --- a/drivers/crypto/nx/nx-aes-gcm.c +++ b/drivers/crypto/nx/nx-aes-gcm.c @@ -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;