netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Sacren <sakiwit@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one()
Date: Sat,  1 Jun 2013 20:23:15 -0600	[thread overview]
Message-ID: <1370139797-8912-1-git-send-email-sakiwit@gmail.com> (raw)

Clean up unnecessary assignment and jump. While there, fix up the label
name.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 net/xfrm/xfrm_output.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 0cf003d..eb4a842 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -89,7 +89,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 
 		err = x->type->output(x, skb);
 		if (err == -EINPROGRESS)
-			goto out_exit;
+			goto out;
 
 resume:
 		if (err) {
@@ -107,15 +107,14 @@ resume:
 		x = dst->xfrm;
 	} while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));
 
-	err = 0;
+	return 0;
 
-out_exit:
-	return err;
 error:
 	spin_unlock_bh(&x->lock);
 error_nolock:
 	kfree_skb(skb);
-	goto out_exit;
+out:
+	return err;
 }
 
 int xfrm_output_resume(struct sk_buff *skb, int err)

             reply	other threads:[~2013-06-02  2:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02  2:23 Jean Sacren [this message]
2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
2013-06-02  2:40   ` Joe Perches
2013-06-02  3:18     ` Jean Sacren
2013-06-02  3:24       ` Joe Perches
2013-06-02  4:05         ` Jean Sacren
2013-06-04 22:19   ` David Miller
2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
2013-06-02 10:09   ` Bjørn Mork
2013-06-02 17:28     ` Jean Sacren
2013-06-02 19:24       ` Bjørn Mork
2013-06-04 22:19   ` David Miller
2013-06-04 22:19 ` [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370139797-8912-1-git-send-email-sakiwit@gmail.com \
    --to=sakiwit@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).