'out' can be replaced by 'return ret' and 'return -ECANCELED'.
CC: John Snow <[email protected]>
CC: [email protected]
Signed-off-by: Daniel Henrique Barboza <[email protected]>
---
block/backup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index cf62b1a38c..e73294872c 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -254,13 +254,12 @@ static int coroutine_fn backup_run(Job *job, Error **errp)
for (offset = 0; offset < s->len; ) {
if (yield_and_check(s)) {
- ret = -ECANCELED;
- goto out;
+ return -ECANCELED;
}
ret = block_copy_reset_unallocated(s->bcs, offset, &count);
if (ret < 0) {
- goto out;
+ return ret;
}
offset += count;
@@ -284,7 +283,6 @@ static int coroutine_fn backup_run(Job *job, Error **errp)
ret = backup_loop(s);
}
- out:
return ret;
}
--
2.24.1