diff mbox

crypto: ccm - remove goto

Message ID 1444724305-3235-1-git-send-email-sudipm.mukherjee@gmail.com (mailing list archive)
State Rejected
Delegated to: Herbert Xu
Headers show

Commit Message

Sudip Mukherjee Oct. 13, 2015, 8:18 a.m. UTC
Instead of using goto and jumping to a label and then returning from
there, lets return directly. The label out: is not used from anywhere
else in the code.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 crypto/ccm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Herbert Xu Oct. 14, 2015, 2:13 p.m. UTC | #1
On Tue, Oct 13, 2015 at 01:48:25PM +0530, Sudip Mukherjee wrote:
> Instead of using goto and jumping to a label and then returning from
> there, lets return directly. The label out: is not used from anywhere
> else in the code.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

I don't think patch improves the code so I'm not taking it.

Cheers,
diff mbox

Patch

diff --git a/crypto/ccm.c b/crypto/ccm.c
index cc31ea4..daa7e6d 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -881,14 +881,13 @@  static int crypto_rfc4309_create(struct crypto_template *tmpl,
 	if (err)
 		goto out_drop_alg;
 
-out:
 	return err;
 
 out_drop_alg:
 	crypto_drop_aead(spawn);
 out_free_inst:
 	kfree(inst);
-	goto out;
+	return err;
 }
 
 static struct crypto_template crypto_rfc4309_tmpl = {