aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:06:04 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commit992861fb1e4cf410f30ec8f05bd2dc2a14a5a027 (patch)
tree9d4d5de47d4ebae50838cd7f8ea39b89a3604507 /block
parentaf175e85f92c870386ad74f466e29537b79611d3 (diff)
error: Eliminate error_propagate() manually
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous two commits did that for sufficiently simple cases with Coccinelle. Do it for several more manually. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200707160613.848843-37-armbru@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/replication.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/replication.c b/block/replication.c
index b844a09eb1..dcd430624e 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -367,7 +367,6 @@ static void reopen_backing_file(BlockDriverState *bs, bool writable,
{
BDRVReplicationState *s = bs->opaque;
BlockReopenQueue *reopen_queue = NULL;
- Error *local_err = NULL;
if (writable) {
s->orig_hidden_read_only = bdrv_is_read_only(s->hidden_disk->bs);
@@ -392,8 +391,7 @@ static void reopen_backing_file(BlockDriverState *bs, bool writable,
}
if (reopen_queue) {
- bdrv_reopen_multiple(reopen_queue, &local_err);
- error_propagate(errp, local_err);
+ bdrv_reopen_multiple(reopen_queue, errp);
}
bdrv_subtree_drained_end(s->hidden_disk->bs);