xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, lliubbo@gmail.com, bob.liu@oracle.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH] tmem: Drop a gross goto usage.
Date: Wed,  5 Mar 2014 16:51:57 -0500	[thread overview]
Message-ID: <1394056317-13704-1-git-send-email-konrad.wilk@oracle.com> (raw)

No need to do it that way.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index bcf9bbf..9868fe3 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2597,17 +2597,15 @@ long do_tmem_op(tmem_cli_op_t uops)
 
     if ( client != NULL && client->domain->is_dying )
     {
-        rc = -ENODEV;
- simple_error:
         errored_tmem_ops++;
-        return rc;
+        return -ENODEV;
     }
 
     if ( unlikely(tmem_get_tmemop_from_client(&op, uops) != 0) )
     {
         tmem_client_err("tmem: can't get tmem struct from %s\n", tmem_client_str);
-        rc = -EFAULT;
-        goto simple_error;
+        errored_tmem_ops++;
+        return -EFAULT;
     }
 
     /* Acquire wirte lock for all command at first */
-- 
1.8.5.3

             reply	other threads:[~2014-03-05 21:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 21:51 Konrad Rzeszutek Wilk [this message]
2014-03-06 11:25 ` [PATCH] tmem: Drop a gross goto usage Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2014-03-06 11:43 Konrad Rzeszutek Wilk

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=1394056317-13704-1-git-send-email-konrad.wilk@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=bob.liu@oracle.com \
    --cc=lliubbo@gmail.com \
    --cc=xen-devel@lists.xenproject.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).