[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] 9pfs/9p.c: remove unneeded labels
From: |
Greg Kurz |
Subject: |
[PULL 5/5] 9pfs/9p.c: remove unneeded labels |
Date: |
Tue, 14 Jan 2020 17:02:35 +0100 |
From: Daniel Henrique Barboza <address@hidden>
'out' label in v9fs_xattr_write() and 'out_nofid' label in
v9fs_complete_rename() can be replaced by appropriate return
calls.
CC: Greg Kurz <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
Acked-by: Greg Kurz <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
---
hw/9pfs/9p.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 2efed37753ed..869379ddd87c 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -2473,8 +2473,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu,
V9fsFidState *fidp,
if (fidp->fs.xattr.len < off) {
- err = -ENOSPC;
- goto out;
+ return -ENOSPC;
}
write_count = fidp->fs.xattr.len - off;
if (write_count > count) {
@@ -2500,7 +2499,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu,
V9fsFidState *fidp,
off += to_copy;
write_count -= to_copy;
}
-out:
+
return err;
}
@@ -3068,8 +3067,7 @@ static int coroutine_fn v9fs_complete_rename(V9fsPDU
*pdu, V9fsFidState *fidp,
if (newdirfid != -1) {
dirfidp = get_fid(pdu, newdirfid);
if (dirfidp == NULL) {
- err = -ENOENT;
- goto out_nofid;
+ return -ENOENT;
}
if (fidp->fid_type != P9_FID_NONE) {
err = -EINVAL;
@@ -3112,7 +3110,6 @@ out:
put_fid(pdu, dirfidp);
}
v9fs_path_free(&new_path);
-out_nofid:
return err;
}
--
2.21.1
- [PULL 0/5] 9p patches 2020-01-14, Greg Kurz, 2020/01/14
- [PULL 2/5] 9p: local: always return -1 on error in local_unlinkat_common, Greg Kurz, 2020/01/14
- [PULL 1/5] 9pfs: local: Fix possible memory leak in local_link(), Greg Kurz, 2020/01/14
- [PULL 3/5] 9p: init_in_iov_from_pdu can truncate the size, Greg Kurz, 2020/01/14
- [PULL 4/5] virtfs-proxy-helper.c: remove 'err_out' label in setugid(), Greg Kurz, 2020/01/14
- [PULL 5/5] 9pfs/9p.c: remove unneeded labels,
Greg Kurz <=
- Re: [PULL 0/5] 9p patches 2020-01-14, Peter Maydell, 2020/01/17