From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 13 Aug 2015 09:28:56 +0000 (+0800)
Subject: crypto: echainiv - Remove AEAD compatibility code
X-Git-Tag: firefly_0821_release~176^2~874^2~40
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=66008d4230f6e599275f1cf01db268fcaaadda44;p=firefly-linux-kernel-4.4.55.git

crypto: echainiv - Remove AEAD compatibility code

Now that we no longer have any legacy AEAD implementations the
compatibility code path can no longer be triggered.  This patch
removes it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

diff --git a/crypto/echainiv.c b/crypto/echainiv.c
index d3896c7e634b..806ebe73cb64 100644
--- a/crypto/echainiv.c
+++ b/crypto/echainiv.c
@@ -247,9 +247,6 @@ static int echainiv_aead_create(struct crypto_template *tmpl,
 	spawn = aead_instance_ctx(inst);
 	alg = crypto_spawn_aead_alg(spawn);
 
-	if (alg->base.cra_aead.encrypt)
-		goto done;
-
 	err = -EINVAL;
 	if (inst->alg.ivsize & (sizeof(u32) - 1) ||
 	    inst->alg.ivsize > MAX_IV_SIZE)
@@ -267,7 +264,6 @@ static int echainiv_aead_create(struct crypto_template *tmpl,
 
 	inst->free = aead_geniv_free;
 
-done:
 	err = aead_register_instance(tmpl, inst);
 	if (err)
 		goto free_inst;