[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] tmem: Drop a gross goto usage.



No need to do it that way.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.