aboutsummaryrefslogtreecommitdiff
path: root/block/vpc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:06:07 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commitb11a093c6025635b4504d79d30daa334a01279a5 (patch)
treeba15ee5016a149a5fc3d302417398cd585754f13 /block/vpc.c
parent4bc6d7ee0e95b879b7f4823b6e765cf9bf5845e7 (diff)
qapi: Smooth another visitor error checking pattern
Convert visit_type_FOO(v, ..., &ptr, &err); ... if (err) { ... } to visit_type_FOO(v, ..., &ptr, errp); ... if (!ptr) { ... } for functions that set @ptr to non-null / null on success / error. Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200707160613.848843-40-armbru@redhat.com>
Diffstat (limited to 'block/vpc.c')
-rw-r--r--block/vpc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/vpc.c b/block/vpc.c
index cfec15f562..131b9db6cc 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -1095,7 +1095,6 @@ static int coroutine_fn vpc_co_create_opts(BlockDriver *drv,
QDict *qdict;
Visitor *v;
BlockDriverState *bs = NULL;
- Error *local_err = NULL;
int ret;
static const QDictRenames opt_renames[] = {
@@ -1134,11 +1133,9 @@ static int coroutine_fn vpc_co_create_opts(BlockDriver *drv,
goto fail;
}
- visit_type_BlockdevCreateOptions(v, NULL, &create_options, &local_err);
+ visit_type_BlockdevCreateOptions(v, NULL, &create_options, errp);
visit_free(v);
-
- if (local_err) {
- error_propagate(errp, local_err);
+ if (!create_options) {
ret = -EINVAL;
goto fail;
}